Systems and methods for commissioning a smart hub device

ABSTRACT

This application discloses a method for commissioning an electronic device in a smart home environment. The electronic device receives from a client device one-way signals that are encoded with communication data. The client device is located in proximity, and executes a client-side application associated with a user account that generates the one-way signals. The encoded communication data includes at least one or more network credentials of a local area network, and an authentication token that provides sufficient information to identify the user account. The electronic device generates a link approval request including the authentication token, and device identification information that identifies the electronic device. The electronic device then accesses the local area network using the network credentials provided by the client device, and sends the link approval request to a server via the local area network for association with the user account and addition to the smart home environment.

CROSS REFERENCE TO RELATED APPLICATION

This application claims priority to U.S. Provisional Patent ApplicationNo. 62/078,934, titled “Systems and Methods for Commissioning a SmartHub Device,” filed on Nov. 12, 2014, and U.S. Provisional PatentApplication No. 62/078,932, titled “User Interfaces, Systems and Methodsfor Configuring Smart Devices for Interoperability with a Smart HubDevice,” filed on Nov. 12, 2014, which are hereby incorporated byreference in their entirety. This application is also a continuation inpart of and claims priority to U.S. Utility patent application Ser. No.14/927,406, filed Oct. 29, 2015, titled “Apparatus and Method forSeamless Commissioning of Wireless Devices,” which is a continuation ofand claims priority to U.S. Utility patent application Ser. No.13/839,828, filed Mar. 15, 2013, titled “Apparatus and Method forSeamless Commissioning of Wireless Devices,” which in turn claimspriority to and the benefit of U.S. Provisional Application No.61/622,620, filed on Apr. 11, 2012, titled “Apparatus and Method forSeamless Commissioning of Wireless Devices.” Content of each of theabove applications is herein incorporated by reference in its entirety.

This application is related to U.S. patent application Ser. No.14/938,806, filed Nov. 11, 2015, entitled “Data Processing Systems andMethods for Smart Hub Devices,” U.S. patent application Ser. No.14/939,629, filed Nov. 12, 2015, entitled “Data Communication Systemsand Methods for Smart Hub,” U.S. patent application Ser. No. 14/940,139,filed Nov. 12, 2015, entitled “User Interfaces, Systems and Methods forConfiguring Smart Devices for Interoperability with a Smart Hub Device,”and U.S. patent application Ser. No. 14/940,132, filed Nov. 12, 2015,entitled “User Interfaces, Systems and Methods for Configuring SmartDevices for Interoperability with a Smart Hub Device,” which are herebyincorporated by reference in their entirety.

This application is also related to U.S. patent application Ser. No.14/265,121, filed Apr. 29, 2014, titled “Apparatus and Method for theVirtual Demonstration of a Smart Phone Controlled Smart Home Using aWebsite,” which claims priority to and the benefit of U.S. ProvisionalApplication No. 61/817,778, filed on Apr. 30, 2013, titled “Apparatusand Method for Seamless Commissioning of Wireless Devices.” Content ofeach of these applications is herein incorporated by reference in itsentirety.

This application is also related to U.S. patent application Ser. No.14/474,926, filed Sep. 2, 2014, titled “Apparatus And Method ForEfficient Two-Way Optical Communication Where Transmitter May InterfereWith Receiver,” which claims priority to and the benefit of U.S.Provisional Application Nos. 61/872,330 and 61/918,716, filed on Aug.30, 2013 and Dec. 20, 2013, respectively, both titled “Apparatus AndMethod For Efficient Two-Way Optical Communication Where Transmitter MayInterfere With Receiver.” Content of each of these applications isherein incorporated by reference in its entirety.

This application is also related to U.S. patent application Ser. No.14/581,994, filed Dec. 23, 2014, titled “Systems and Methods forProgramming and Controlling Devices with Sensor Data and Learning,”which claims priority to and the benefit of U.S. Provisional ApplicationNo. 61/919,893, filed on Dec. 23, 2013, titled “System and Method forProgramming and Controlling Devices with Sensor Data, Learning, andRepetition.” Content of each of these applications is hereinincorporated by reference in its entirety.

TECHNICAL FIELD

This relates generally to computer technology, including but not limitedto methods and systems for commissioning a smart hub device byassociating a user account with the smart hub device and establishing asecure network connection for the electronic device.

BACKGROUND

Smart home automation devices are being developed and fielded at such arapid pace that new devices appear on the market practically every day.Because of the proliferation of low-power wireless network and smartphone technologies, it is not uncommon to find home and business ownersin possession of smart home devices such as wireless lights, musicsystems, door locks, thermostats and alarm systems. And wireless whitegoods are just over the horizon. Based on current trends, it is expectedthat the average consumer will own as many as five to ten smart homedevices in just a few years.

One issue with this proliferation of devices is that many such smarthome devices use different communication protocols (e.g., Z-Wave, ZigBeeor Insteon) so devices that use different protocols cannot interoperateseamlessly out of the box. In addition, many such devices are configuredwith different set-up procedures (sometimes called commissioning orprovisioning procedures) depending on one or more of: the type of thedevice, capabilities of the device (e.g., degree of smartness of thedevice) and/or the particular communication protocol employed by thatdevice. As a result, owners of these devices often face a confusingexperience every time they attempt to configure and/or commission a newdevice. Furthermore, different devices of the same type (e.g.,thermostats) can have different capabilities, so users might not haveaccess to expected or desirable product features for a particular typeof device depending on the specific device they purchased.

Therefore, it would be desirable to develop user-friendly solutions toaddress the above-recited issues associated with smart home devices.

SUMMARY

In accordance with one aspect of the application, a method isimplemented at an electronic device to commission the electronic devicein a smart home environment. The electronic device has one or moreprocessors, and memory storing one or more programs for execution by theone or more processors. Device identification information associatedwith the electronic device is stored in the memory of the electronicdevice. The device commissioning method includes receiving from a clientdevice one-way signals that are encoded with communication data. Theclient device is located in proximity to the electronic device. Theclient device is executing a client-side application associated with auser account that generates the one-way signals. The encodedcommunication data includes at least one or more network credentials ofa local area network and an authentication token, and the authenticationtoken provides sufficient information to identify the user account ofthe client-side application. The device commissioning method furtherincludes generating a link approval request including at least theauthentication token and the device identification information, and thedevice identification information is obtained from the memory of theelectronic device. The device commissioning method further includesaccessing the local area network using the one or more networkcredentials provided by the client device, and sending the link approvalrequest to a server via the local area network. The server is configuredto confirm availability of the electronic device for commissioning andto link the electronic device with the user account according to theauthentication token and the device identification information.

In accordance with one aspect of the application, a method isimplemented at a client device for adding a smart device in a smart homeenvironment. The smart home environment includes one or more smartdevices. The client device has one or more processors and memory storingone or more programs for execution by the one or more processors. Thesmart device adding method includes executing a client-side applicationassociated with a user account, and the client-side application isassociated with an electronic device that is coupled to the clientdevice over a first communication network. The smart device addingmethod further includes displaying by the client-side application afirst user interface for adding a new smart device. The first userinterface includes a first affordance that when selected causes theelectronic device to initiate a plurality of commissioning options. Theplurality of commissioning options are defined according to at least oneof a device type of a new smart device, a communication protocolassociated with a new smart device, and a level of user interactioninvolved in a process of adding a smart device. The smart device addingmethod includes displaying a device-specific control user interfaceassociated with the new smart device in response to receiving anindication from the electronic device that the new smart device has beenadded into the smart home environment via communication between theelectronic device and the new smart device using one of a plurality ofcommunication protocols.

In accordance with another aspect of the application, a method isimplemented at an electronic device for adding a smart device in a smarthome environment. The electronic device has one or more processors andmemory storing one or more programs for execution by the one or moreprocessors, and is configured to communicate with a client device and aplurality of smart devices through a plurality of communicationnetworks. The smart device adding method includes receiving from theclient device a request to add a new smart device to the smart homeenvironment over a first communication network of the plurality ofcommunication networks. The request is issued by a client-sideapplication executed by the client device, and the client-sideapplication is associated with a user account. The smart device addingmethod further includes in response to the request, determining that anew smart device is available to add to the smart home environment usinga second communication protocol associated with a second communicationnetwork of the plurality of communication networks. The smart deviceadding method further includes connecting to the new smart device viathe second communication network, obtaining device information of thenew smart device via the second communication network, and causing anotification to be provided to a user concerning association of the newsmart device with the user account and addition of the new smart deviceto the smart home environment.

BRIEF DESCRIPTION OF THE DRAWINGS

For a better understanding of the various described implementations,reference should be made to the Description of Implementations below, inconjunction with the following drawings in which like reference numeralsrefer to corresponding parts throughout the figures.

FIG. 1 is an example smart home environment in accordance with someembodiments.

FIG. 2 is a block diagram illustrating an example network architecturethat includes a smart home network in accordance with some embodiments.

FIG. 3 illustrates a network-level view of an extensible devices andservices platform with which the smart home environment of FIG. 1 isintegrated, in accordance with some embodiments.

FIG. 4 illustrates an abstracted functional view of the extensibledevices and services platform of FIG. 3, with reference to a processingengine as well as devices of the smart home environment, in accordancewith some embodiments.

FIG. 5A is a representative operating environment in which a hub serversystem interacts with client devices and hubs communicatively coupled tolocal smart devices in accordance with some implementations.

FIG. 5B is a block diagram of a Revolv Home Automation System inaccordance with some implementations.

FIG. 6 is a block diagram illustrating a representative hub device inaccordance with some implementations.

FIG. 7 is a block diagram illustrating server system in accordance withsome implementations.

FIG. 8 is a block diagram illustrating a representative client deviceassociated with a user account in accordance with some implementations.

FIG. 9A is an example diagram illustrating information flows during thecourse of commissioning a hub device in an operating environment asshown in FIG. 5A in accordance with some implementations.

FIG. 9B is an example flow diagram for commissioning a hub device in anoperating environment as shown in FIG. 5A in accordance with someimplementations.

FIG. 9C is an example flow diagram for commissioning a hub device with afailure in an operating environment as shown in FIG. 5A in accordancewith some implementations.

FIG. 9D is a flow chart for an example method of commissioning anelectronic device (e.g., a hub device) in a smart home environment inaccordance with some implementations of the application.

FIG. 10 illustrates graphic user interfaces (GUI) displayed forcommissioning a hub and controlling smart devices that arecommunicatively coupled to the hub in accordance with someimplementations.

FIGS. 11A-11G illustrate example GUIs displayed for commissioning a hubin accordance with some implementations.

FIGS. 12A-12G illustrate example GUIs displayed for adding andcontrolling sensors that are communicatively coupled to a hub inaccordance with some implementations.

FIG. 13 illustrates example GUIs displayed for controlling sensors basedon geographical information provided by a client device in accordancewith some implementations.

FIGS. 14A and 14B illustrate example GUIs displayed for controllingsensors based on a sequence of events in a user's daily life inaccordance with some implementations.

FIGS. 15A and 15B illustrate example GUIs displayed for controllingsensors based on their physical locations in a smart home environment inaccordance with some implementations.

FIG. 16 is a flow chart for an example method of adding a smart deviceto a smart home environment in accordance with some implementations ofthe application.

FIG. 17 is a flow chart for another example method of adding a smartdevice to a smart home environment in accordance with someimplementations of the application.

FIG. 18 is a flow chart for an example method of adding a smart devicethat communicates based on a WiFi protocol in accordance with someimplementations of the application.

FIG. 19 is a flow chart for an example method of adding a smart devicethat communicates based on a point-to-point protocol in accordance withsome implementations of the application.

FIGS. 20A-20D is a flow chart for a method of adding a smart device thatcommunicates based on a Z-Wave protocol in accordance with someimplementations of the application.

Like reference numerals refer to corresponding parts throughout theseveral views of the drawings.

DESCRIPTION OF IMPLEMENTATIONS

Reference will now be made in detail to embodiments, examples of whichare illustrated in the accompanying drawings. In the following detaileddescription, numerous specific details are set forth in order to providea thorough understanding of the various described embodiments. However,it will be apparent to one of ordinary skill in the art that the variousdescribed embodiments may be practiced without these specific details.In other instances, well-known methods, procedures, components,circuits, and networks have not been described in detail so as not tounnecessarily obscure aspects of the embodiments.

It will also be understood that, although the terms first, second, etc.are, in some instances, used herein to describe various elements, theseelements should not be limited by these terms. These terms are only usedto distinguish one element from another. For example, a first type ofrequest could be termed a second type of request, and, similarly, asecond type of request could be termed a first type of request, withoutdeparting from the scope of the various described embodiments. The firsttype of request and the second type of request are both types ofrequests, but they are not the same type of request.

The terminology used in the description of the various describedembodiments herein is for the purpose of describing particularembodiments only and is not intended to be limiting. As used in thedescription of the various described embodiments and the appendedclaims, the singular forms “a”, “an” and “the” are intended to includethe plural forms as well, unless the context clearly indicatesotherwise. It will also be understood that the term “and/or” as usedherein refers to and encompasses any and all possible combinations ofone or more of the associated listed items. It will be furtherunderstood that the terms “includes,” “including,” “comprises,” and/or“comprising,” when used in this specification, specify the presence ofstated features, integers, steps, operations, elements, and/orcomponents, but do not preclude the presence or addition of one or moreother features, integers, steps, operations, elements, components,and/or groups thereof.

As used herein, the term “if” is, optionally, construed to mean “when”or “upon” or “in response to determining” or “in response to detecting”or “in accordance with a determination that,” depending on the context.Similarly, the phrase “if it is determined” or “if [a stated conditionor event] is detected” is, optionally, construed to mean “upondetermining” or “in response to determining” or “upon detecting [thestated condition or event]” or “in response to detecting [the statedcondition or event]” or “in accordance with a determination that [astated condition or event] is detected,” depending on the context.

It is to be appreciated that “smart home environments” may refer tosmart environments for homes such as a single-family house, but thescope of the present teachings is not so limited. The present teachingsare also applicable, without limitation, to duplexes, townhomes,multi-unit apartment buildings, hotels, retail stores, office buildings,industrial buildings, and more generally any living space or work space.

It is also to be appreciated that while the terms user, customer,installer, homeowner, occupant, guest, tenant, landlord, repair person,and the like may be used to refer to the person or persons acting in thecontext of some particularly situations described herein, thesereferences do not limit the scope of the present teachings with respectto the person or persons who are performing such actions. Thus, forexample, the terms user, customer, purchaser, installer, subscriber, andhomeowner may often refer to the same person in the case of asingle-family residential dwelling, because the head of the household isoften the person who makes the purchasing decision, buys the unit, andinstalls and configures the unit, and is also one of the users of theunit. However, in other scenarios, such as a landlord-tenantenvironment, the customer may be the landlord with respect to purchasingthe unit, the installer may be a local apartment supervisor, a firstuser may be the tenant, and a second user may again be the landlord withrespect to remote control functionality. Importantly, while the identityof the person performing the action may be germane to a particularadvantage provided by one or more of the embodiments, such identityshould not be construed in the descriptions that follow as necessarilylimiting the scope of the present teachings to those particularindividuals having those particular identities.

FIG. 1 is an example smart home environment 100 in accordance with someembodiments. Smart home environment 100 includes a structure 150 (e.g.,a house, office building, garage, or mobile home) with variousintegrated devices. It will be appreciated that devices may also beintegrated into a smart home environment 100 that does not include anentire structure 150, such as an apartment, condominium, or officespace. Further, the smart home environment 100 may control and/or becoupled to devices outside of the actual structure 150. Indeed, severaldevices in the smart home environment 100 need not be physically withinthe structure 150. For example, a device controlling a pool heater 114or irrigation system 116 may be located outside of the structure 150.

The depicted structure 150 includes a plurality of rooms 152, separatedat least partly from each other via walls 154. The walls 154 may includeinterior walls or exterior walls. Each room may further include a floor156 and a ceiling 158. Devices may be mounted on, integrated with and/orsupported by a wall 154, floor 156 or ceiling 158.

In some embodiments, the integrated devices of the smart homeenvironment 100 include intelligent, multi-sensing, network-connecteddevices that integrate seamlessly with each other in a smart homenetwork (e.g., 202 FIG. 2) and/or with a central server or acloud-computing system to provide a variety of useful smart homefunctions. The smart home environment 100 may include one or moreintelligent, multi-sensing, network-connected thermostats 102(hereinafter referred to as “smart thermostats 102”), one or moreintelligent, network-connected, multi-sensing hazard detection units 104(hereinafter referred to as “smart hazard detectors 104”), and one ormore intelligent, multi-sensing, network-connected entryway interfacedevices 106 (hereinafter referred to as “smart doorbells 106”).

In some embodiments, the one or more smart thermostats 102 detectambient climate characteristics (e.g., temperature and/or humidity) andcontrol a HVAC system 103 accordingly. For example, a respective smartthermostat 102 includes an ambient temperature sensor.

The one or more smart hazard detectors 104 may include thermal radiationsensors directed at respective heat sources (e.g., a stove, oven, otherappliances, a fireplace, etc.). For example, a smart hazard detector 104in a kitchen 153 includes a thermal radiation sensor directed at astove/oven 112. A thermal radiation sensor may determine the temperatureof the respective heat source (or a portion thereof) at which it isdirected and may provide corresponding blackbody radiation data asoutput.

The smart doorbell 106 may detect a person's approach to or departurefrom a location (e.g., an outer door), control doorbell functionality,announce a person's approach or departure via audio or visual means,and/or control settings on a security system (e.g., to activate ordeactivate the security system when occupants go and come).

In some embodiments, the smart home environment 100 includes one or moreintelligent, multi-sensing, network-connected wall switches 108(hereinafter referred to as “smart wall switches 108”), along with oneor more intelligent, multi-sensing, network-connected wall pluginterfaces 110 (hereinafter referred to as “smart wall plugs 110”). Thesmart wall switches 108 may detect ambient lighting conditions, detectroom-occupancy states, and control a power and/or dim state of one ormore lights. In some instances, smart wall switches 108 may also controla power state or speed of a fan, such as a ceiling fan. The smart wallplugs 110 may detect occupancy of a room or enclosure and control supplyof power to one or more wall plugs (e.g., such that power is notsupplied to the plug if nobody is at home).

In some embodiments, the smart home environment 100 of FIG. 1 includes aplurality of intelligent, multi-sensing, network-connected appliances112 (hereinafter referred to as “smart appliances 112”), such asrefrigerators, stoves, ovens, televisions, washers, dryers, lights,stereos, intercom systems, garage-door openers, floor fans, ceilingfans, wall air conditioners, pool heaters, irrigation systems, securitysystems, space heaters, window AC units, motorized duct vents, and soforth. In some embodiments, when plugged in, an appliance may announceitself to the smart home network, such as by indicating what type ofappliance it is, and it may automatically integrate with the controls ofthe smart home. Such communication by the appliance to the smart homemay be facilitated by either a wired or wireless communication protocol.The smart home may also include a variety of non-communicating legacyappliances 140, such as old conventional washer/dryers, refrigerators,and the like, which may be controlled by smart wall plugs 110. The smarthome environment 100 may further include a variety of partiallycommunicating legacy appliances 142, such as infrared (“IR”) controlledwall air conditioners or other IR-controlled devices, which may becontrolled by IR signals provided by the smart hazard detectors 104 orthe smart wall switches 108.

In some embodiments, the smart home environment 100 includes one or morenetwork-connected cameras 118 that are configured to provide videomonitoring and security in the smart home environment 100. The cameras118 may be used to determine occupancy of the structure 150 and/orparticular rooms 152 in the structure 150, and thus may act as occupancysensors. For example, video captured by the cameras 118 may be processedto identify the presence of an occupant in the structure 150 (e.g., in aparticular room 152). Specific individuals may be identified based, forexample, on their appearance (e.g., height, face) and/or movement (e.g.,their walk/gate). The smart home environment 100 may additionally oralternatively include one or more other occupancy sensors (e.g., thesmart doorbell 106, smart doorlocks, touch screens, IR sensors,microphones, ambient light sensors, motion detectors, smart nightlights170, etc.). In some embodiments, the smart home environment 100 includesradio-frequency identification (RFID) readers (e.g., in each room 152 ora portion thereof) that determine occupancy based on RFID tags locatedon or embedded in occupants. For example, RFID readers may be integratedinto the smart hazard detectors 104.

The smart home environment 100 may also include communication withdevices outside of the physical home but within a proximate geographicalrange of the home. For example, the smart home environment 100 mayinclude a pool heater monitor 114 that communicates a current pooltemperature to other devices within the smart home environment 100and/or receives commands for controlling the pool temperature.Similarly, the smart home environment 100 may include an irrigationmonitor 116 that communicates information regarding irrigation systemswithin the smart home environment 100 and/or receives controlinformation for controlling such irrigation systems.

By virtue of network connectivity, one or more of the smart home devicesof FIG. 1 may further allow a user to interact with the device even ifthe user is not proximate to the device. For example, a user maycommunicate with a device using a computer (e.g., a desktop computer,laptop computer, or tablet) or other portable electronic device (e.g., amobile phone, such as a smart phone) 166. A webpage or application maybe configured to receive communications from the user and control thedevice based on the communications and/or to present information aboutthe device's operation to the user. For example, the user may view acurrent set point temperature for a device (e.g., a stove) and adjust itusing a computer. The user may be in the structure during this remotecommunication or outside the structure.

As discussed above, users may control smart devices in the smart homeenvironment 100 using a network-connected computer or portableelectronic device 166. In some examples, some or all of the occupants(e.g., individuals who live in the home) may register their device 166with the smart home environment 100. Such registration may be made at acentral server to authenticate the occupant and/or the device as beingassociated with the home and to give permission to the occupant to usethe device to control the smart devices in the home. An occupant may usetheir registered device 166 to remotely control the smart devices of thehome, such as when the occupant is at work or on vacation. The occupantmay also use their registered device to control the smart devices whenthe occupant is actually located inside the home, such as when theoccupant is sitting on a couch inside the home. It should be appreciatedthat instead of or in addition to registering devices 166, the smarthome environment 100 may make inferences about which individuals live inthe home and are therefore occupants and which devices 166 areassociated with those individuals. As such, the smart home environmentmay “learn” who is an occupant and permit the devices 166 associatedwith those individuals to control the smart devices of the home.

In some embodiments, in addition to containing processing and sensingcapabilities, devices 102, 104, 106, 108, 110, 112, 114, 116 and/or 118(collectively referred to as “the smart devices”) are capable of datacommunications and information sharing with other smart devices, acentral server or cloud-computing system, and/or other devices that arenetwork-connected. Data communications may be carried out using any of avariety of custom or standard wireless protocols (e.g., IEEE 802.15.4,Wi-Fi, ZigBee, 6LoWPAN, Thread, Z-Wave, Bluetooth Smart, ISA100.11a,WirelessHART, MiWi, etc.) and/or any of a variety of custom or standardwired protocols (e.g., Ethernet, HomePlug, etc.), or any other suitablecommunication protocol, including communication protocols not yetdeveloped as of the filing date of this document.

In some embodiments, the smart devices serve as wireless or wiredrepeaters. In some embodiments, a first one of the smart devicescommunicates with a second one of the smart devices via a wirelessrouter. The smart devices may further communicate with each other via aconnection (e.g., network interface 160) to a network, such as theInternet 162. Through the Internet 162, the smart devices maycommunicate with a smart home provider server system 164 (also called acentral server system and/or a cloud-computing system herein). The smarthome provider server system 164 may be associated with a manufacturer,support entity, or service provider associated with the smart device(s).In some embodiments, a user is able to contact customer support using asmart device itself rather than needing to use other communicationmeans, such as a telephone or Internet-connected computer. In someembodiments, software updates are automatically sent from the smart homeprovider server system 164 to smart devices (e.g., when available, whenpurchased, or at routine intervals).

In some embodiments, the network interface 160 includes a conventionalnetwork device (e.g., a router), and the smart home environment 100 ofFIG. 1 includes a hub device 180 that is communicatively coupled to thenetwork(s) 162 directly or via the network interface 160. The hub device180 is further communicatively coupled to one or more of the aboveintelligent, multi-sensing, network-connected thermostats 102, hazarddetectors 104, doorbell 106, wall switches 108, wall plugs 110,appliances 112, cameras 118 and the like. Each of these smart devicesoptionally communicates with the hub device 180 using one or more radiocommunication networks available at least in the smart home environment100 (e.g., ZigBee, Z-Wave, Insteon, Bluetooth, Wi-Fi and other radiocommunication networks). In some implementations, the hub device 180 anddevices coupled with/to the hub device can be controlled and/orinteracted with via an application running on a smart phone, householdcontroller, laptop, tablet computer, game console or similar electronicdevice. In some embodiments, a user of such controller application canview status of the hub device or coupled smart devices, configure thehub to interoperate with smart devices newly introduced to the homenetwork, commission new smart devices, and adjust or view settings ofconnected smart devices, etc. In some implementations the hub deviceextends capabilities of low capability smart device to matchcapabilities of the highly capable smart devices of the same type,integrates functionality of multiple different device types—even acrossdifferent communication protocols, and is configured to streamlineadding of new devices and commissioning of the hub.

Generally, in some embodiments, the network interface 160 includes aconventional network device (e.g., a router), and the smart homeenvironment 100 of FIG. 1 includes a hub device 180 that iscommunicatively coupled to the network(s) 162 directly or via thenetwork interface 160. The hub device 180 is further communicativelycoupled to one or more of the above intelligent, multi-sensing,network-connected thermostats 102, hazard detectors 104, doorbell 106,wall switches 108, wall plugs 110, appliances 112, cameras 118 and thelike. Each of these smart devices optionally communicates with the hubdevice 180 using a radio communication network available at least in thesmart home environment 100.

FIG. 2 is a block diagram illustrating an example network architecture200 that includes a smart home network 202 in accordance with someembodiments. In some embodiments, the smart devices 204 in the smarthome environment 100 (e.g., devices 102, 104, 106, 108, 110, 112, 114,116 and/or 118) combine with hub device 180 to create a mesh network insmart home network 202. In some embodiments, one or more smart devices204 in the smart home network 202 operate as a smart home controller.Additionally and/or alternatively, hub device 180 operates as the smarthome controller. In some embodiments, a smart home controller has morecomputing power than other smart devices. In some embodiments, a smarthome controller processes inputs (e.g., from smart devices 204,electronic device 166, and/or smart home provider server system 164) andsends commands (e.g., to smart devices 204 in the smart home network202) to control operation of the smart home environment 100. In someembodiments, some of the smart devices 204 in the smart home network 202(e.g., in the mesh network) are “spokesman” nodes (e.g., 204-1) andothers are “low-powered” nodes (e.g., 204-9). Some of the smart devicesin the smart home environment 100 are battery powered, while others havea regular and reliable power source, such as by connecting to wiring(e.g., to 120V line voltage wires) behind the walls 154 of the smarthome environment. The smart devices that have a regular and reliablepower source are referred to as “spokesman” nodes. These nodes aretypically equipped with the capability of using a wireless protocol tofacilitate bidirectional communication with a variety of other devicesin the smart home environment 100, as well as with the smart homeprovider server system 164. In some embodiments, one or more “spokesman”nodes operate as a smart home controller. On the other hand, the devicesthat are battery powered are the “low-power” nodes. These nodes tend tobe smaller than spokesman nodes and typically only communicate usingwireless protocols that require very little power, such as Zigbee,6LoWPAN, etc.

In some embodiments, some low-power nodes are incapable of bidirectionalcommunication. These low-power nodes send messages, but they are unableto “listen”. Thus, other devices in the smart home environment 100, suchas the spokesman nodes, cannot send information to these low-powernodes.

In some embodiments, some low-power nodes are capable of only a limitedbidirectional communication. For example, other devices are able tocommunicate with the low-power nodes only during a certain time period.

As described, in some embodiments, the smart devices serve as low-powerand spokesman nodes to create a mesh network in the smart homeenvironment 100. In some embodiments, individual low-power nodes in thesmart home environment regularly send out messages regarding what theyare sensing, and the other low-powered nodes in the smart homeenvironment—in addition to sending out their own messages—forward themessages, thereby causing the messages to travel from node to node(i.e., device to device) throughout the smart home network 202. In someembodiments, the spokesman nodes in the smart home network 202, whichare able to communicate using a relatively high-power communicationprotocol, such as IEEE 802.11, are able to switch to a relativelylow-power communication protocol, such as IEEE 802.15.4, to receivethese messages, translate the messages to other communication protocols,and send the translated messages to other spokesman nodes and/or thesmart home provider server system 164 (using, e.g., the relativelyhigh-power communication protocol). Thus, the low-powered nodes usinglow-power communication protocols are able to send and/or receivemessages across the entire smart home network 202, as well as over theInternet 162 to the smart home provider server system 164. In someembodiments, the mesh network enables the smart home provider serversystem 164 to regularly receive data from most or all of the smartdevices in the home, make inferences based on the data, facilitate statesynchronization across devices within and outside of the smart homenetwork 202, and send commands back to one or more of the smart devicesto perform tasks in the smart home environment.

As described, the spokesman nodes and some of the low-powered nodes arecapable of “listening.” Accordingly, users, other devices, and/or thesmart home provider server system 164 may communicate control commandsto the low-powered nodes. For example, a user may use the electronicdevice 166 (e.g., a smart phone) to send commands over the Internet tothe smart home provider server system 164, which then relays thecommands to one or more spokesman nodes in the smart home network 202.The spokesman nodes may use a low-power protocol to communicate thecommands to the low-power nodes throughout the smart home network 202,as well as to other spokesman nodes that did not receive the commandsdirectly from the smart home provider server system 164.

In some embodiments, a smart nightlight 170 (FIG. 1), which is anexample of a smart device 204, is a low-power node. In addition tohousing a light source, the smart nightlight 170 houses an occupancysensor, such as an ultrasonic or passive IR sensor, and an ambient lightsensor, such as a photo resistor or a single-pixel sensor that measureslight in the room. In some embodiments, the smart nightlight 170 isconfigured to activate the light source when its ambient light sensordetects that the room is dark and when its occupancy sensor detects thatsomeone is in the room. In other embodiments, the smart nightlight 170is simply configured to activate the light source when its ambient lightsensor detects that the room is dark. Further, in some embodiments, thesmart nightlight 170 includes a low-power wireless communication chip(e.g., a ZigBee chip) that regularly sends out messages regarding theoccupancy of the room and the amount of light in the room, includinginstantaneous messages coincident with the occupancy sensor detectingthe presence of a person in the room. As mentioned above, these messagesmay be sent wirelessly (e.g., using the mesh network) from node to node(i.e., smart device to smart device) within the smart home network 202as well as over the Internet 162 to the smart home provider serversystem 164.

Other examples of low-power nodes include battery-operated versions ofthe smart hazard detectors 104. These smart hazard detectors 104 areoften located in an area without access to constant and reliable powerand may include any number and type of sensors, such as smoke/fire/heatsensors (e.g., thermal radiation sensors), carbon monoxide/dioxidesensors, occupancy/motion sensors, ambient light sensors, ambienttemperature sensors, humidity sensors, and the like. Furthermore, smarthazard detectors 104 may send messages that correspond to each of therespective sensors to the other devices and/or the smart home providerserver system 164, such as by using the mesh network as described above.

Examples of spokesman nodes include smart doorbells 106, smartthermostats 102, smart wall switches 108, and smart wall plugs 110.These devices 102, 106, 108, and 110 are often located near andconnected to a reliable power source, and therefore may include morepower-consuming components, such as one or more communication chipscapable of bidirectional communication in a variety of protocols.

In some embodiments, the smart home environment 100 includes servicerobots 168 (FIG. 1) that are configured to carry out, in an autonomousmanner, any of a variety of household tasks.

As explained above with reference to FIG. 1, in some embodiments, thesmart home environment 100 of FIG. 1 includes a hub device 180 that iscommunicatively coupled to the network(s) 162 directly or via thenetwork interface 160. The hub device 180 is further communicativelycoupled to one or more of the smart devices using a radio communicationnetwork that is available at least in the smart home environment 100.Communication protocols used by the radio communication network include,but are not limited to, ZigBee, Z-Wave, Insteon, EuOcean, Thread, OSIAN,Bluetooth Low Energy and the like. The hub device 180 not only convertsthe data received from each smart device to meet the data formatrequirements of the network interface 160 or the network(s) 162, butalso converts information received from the network interface 160 or thenetwork(s) 162 to meet the data format requirements of the respectivecommunication protocol associated with a targeted smart device. In someimplementations, in addition to data format conversion, the hub device180 further processes the data received from the smart devices orinformation received from the network interface 160 or the network(s)162 preliminary. It is also noted that in some embodiments, the networkinterface 160 and the hub device 180 are integrated to one networkdevice. Functionality described herein is representative of particularimplementations of smart devices, control application(s) running onrepresentative electronic device(s) (such as a smart phone), hubdevice(s) 180, and server(s) coupled to hub device(s) via the Internetor other Wide Area Network. All or a portion of this functionality andassociated operations can be performed by any elements of the describedsystem—for example, all or a portion of the functionality describedherein as being performed by an implementation of the hub device can beperformed, in different system implementations, in whole or in part onthe server, one or more connected smart devices and/or the controlapplication, or different combinations thereof.

FIG. 3 illustrates a network-level view of an extensible devices andservices platform with which the smart home environment of FIG. 1 isintegrated, in accordance with some embodiments. The extensible devicesand services platform 300 includes smart home provider server system164. Each of the intelligent, network-connected devices described withreference to FIG. 1 (e.g., 102, 104, 106, 108, 110, 112, 114, 116 and118, identified simply as “devices” in FIGS. 2-4) may communicate withthe smart home provider server system 164. For example, a connection tothe Internet 162 may be established either directly (for example, using3G/4G connectivity to a wireless carrier), or through a networkinterface 160 (e.g., a router, switch, gateway, hub, or an intelligent,dedicated whole-home controller node), or through any combinationthereof.

In some embodiments, the devices and services platform 300 communicateswith and collects data from the smart devices of the smart homeenvironment 100. In addition, in some embodiments, the devices andservices platform 300 communicates with and collects data from aplurality of smart home environments across the world. For example, thesmart home provider server system 164 collects home data 302 from thedevices of one or more smart home environments 100, where the devicesmay routinely transmit home data or may transmit home data in specificinstances (e.g., when a device queries the home data 302). Exemplarycollected home data 302 includes, without limitation, power consumptiondata, blackbody radiation data, occupancy data, HVAC settings and usagedata, carbon monoxide levels data, carbon dioxide levels data, volatileorganic compounds levels data, sleeping schedule data, cooking scheduledata, inside and outside temperature humidity data, televisionviewership data, inside and outside noise level data, pressure data,video data, etc.

In some embodiments, the smart home provider server system 164 providesone or more services 304 to smart homes and/or third parties. Exemplaryservices 304 include, without limitation, software updates, customersupport, sensor data collection/logging, remote access, remote ordistributed control, and/or use suggestions (e.g., based on collectedhome data 302) to improve performance, reduce utility cost, increasesafety, etc. In some embodiments, data associated with the services 304is stored at the smart home provider server system 164, and the smarthome provider server system 164 retrieves and transmits the data atappropriate times (e.g., at regular intervals, upon receiving a requestfrom a user, etc.).

In some embodiments, the extensible devices and services platform 300includes a processing engine 306, which may be concentrated at a singleserver or distributed among several different computing entities withoutlimitation. In some embodiments, the processing engine 306 includesengines configured to receive data from the devices of smart homeenvironments 100 (e.g., via the Internet 162 and/or a network interface160), to index the data, to analyze the data and/or to generatestatistics based on the analysis or as part of the analysis. In someembodiments, the analyzed data is stored as derived home data 308.

Results of the analysis or statistics may thereafter be transmitted backto the device that provided home data used to derive the results, toother devices, to a server providing a webpage to a user of the device,or to other non-smart device entities. In some embodiments, usestatistics, use statistics relative to use of other devices, usepatterns, and/or statistics summarizing sensor readings are generated bythe processing engine 306 and transmitted. The results or statistics maybe provided via the Internet 162. In this manner, the processing engine306 may be configured and programmed to derive a variety of usefulinformation from the home data 302. A single server may include one ormore processing engines.

The derived home data 308 may be used at different granularities for avariety of useful purposes, ranging from explicit programmed control ofthe devices on a per-home, per-neighborhood, or per-region basis (forexample, demand-response programs for electrical utilities), to thegeneration of inferential abstractions that may assist on a per-homebasis (for example, an inference may be drawn that the homeowner hasleft for vacation and so security detection equipment may be put onheightened sensitivity), to the generation of statistics and associatedinferential abstractions that may be used for government or charitablepurposes. For example, processing engine 306 may generate statisticsabout device usage across a population of devices and send thestatistics to device users, service providers or other entities (e.g.,entities that have requested the statistics and/or entities that haveprovided monetary compensation for the statistics).

In some embodiments, to encourage innovation and research and toincrease products and services available to users, the devices andservices platform 300 exposes a range of application programminginterfaces (APIs) 310 to third parties, such as charities 314,governmental entities 316 (e.g., the Food and Drug Administration or theEnvironmental Protection Agency), academic institutions 318 (e.g.,university researchers), businesses 320 (e.g., providing devicewarranties or service to related equipment, targeting advertisementsbased on home data), utility companies 324, and other third parties. TheAPIs 310 are coupled to and permit third-party systems to communicatewith the smart home provider server system 164, including the services304, the processing engine 306, the home data 302, and the derived homedata 308. In some embodiments, the APIs 310 allow applications executedby the third parties to initiate specific data processing tasks that areexecuted by the smart home provider server system 164, as well as toreceive dynamic updates to the home data 302 and the derived home data308.

For example, third parties may develop programs and/or applications,such as web applications or mobile applications that integrate with thesmart home provider server system 164 to provide services andinformation to users. Such programs and applications may be, forexample, designed to help users reduce energy consumption, topreemptively service faulty equipment, to prepare for high servicedemands, to track past service performance, etc., and/or to performother beneficial functions or tasks.

FIG. 4 illustrates an abstracted functional view 400 of the extensibledevices and services platform 300 of FIG. 3, with reference to aprocessing engine 306 as well as devices of the smart home environment,in accordance with some embodiments. Even though devices situated insmart home environments will have a wide variety of different individualcapabilities and limitations, the devices may be thought of as sharingcommon characteristics in that each device is a data consumer 402 (DC),a data source 404 (DS), a services consumer 406 (SC), and a servicessource 408 (SS). Advantageously, in addition to providing controlinformation used by the devices to achieve their local and immediateobjectives, the extensible devices and services platform 300 may also beconfigured to use the large amount of data that is generated by thesedevices. In addition to enhancing or optimizing the actual operation ofthe devices themselves with respect to their immediate functions, theextensible devices and services platform 300 may be directed to“repurpose” that data in a variety of automated, extensible, flexible,and/or scalable ways to achieve a variety of useful objectives. Theseobjectives may be predefined or adaptively identified based on, e.g.,usage patterns, device efficiency, and/or user input (e.g., requestingspecific functionality).

FIG. 4 shows processing engine 306 as including a number of processingparadigms 410. In some embodiments, processing engine 306 includes amanaged services paradigm 410 a that monitors and manages primary orsecondary device functions. The device functions may include ensuringproper operation of a device given user inputs, estimating that (e.g.,and responding to an instance in which) an intruder is or is attemptingto be in a dwelling, detecting a failure of equipment coupled to thedevice (e.g., a light bulb having burned out), implementing or otherwiseresponding to energy demand response events, providing a heat-sourcealert, and/or alerting a user of a current or predicted future event orcharacteristic. In some embodiments, processing engine 306 includes anadvertising/communication paradigm 410 b that estimates characteristics(e.g., demographic information), desires and/or products of interest ofa user based on device usage. Services, promotions, products or upgradesmay then be offered or automatically provided to the user. In someembodiments, processing engine 306 includes a social paradigm 410 c thatuses information from a social network, provides information to a socialnetwork (for example, based on device usage), and/or processes dataassociated with user and/or device interactions with the social networkplatform. For example, a user's status as reported to their trustedcontacts on the social network may be updated to indicate when the useris home based on light detection, security system inactivation or deviceusage detectors. As another example, a user may be able to sharedevice-usage statistics with other users. In yet another example, a usermay share HVAC settings that result in low power bills and other usersmay download the HVAC settings to their smart thermostat 102 to reducetheir power bills.

In some embodiments, processing engine 306 includes achallenges/rules/compliance/rewards paradigm 410 d that informs a userof challenges, competitions, rules, compliance regulations and/orrewards and/or that uses operation data to determine whether a challengehas been met, a rule or regulation has been complied with and/or areward has been earned. The challenges, rules, and/or regulations mayrelate to efforts to conserve energy, to live safely (e.g., reducing theoccurrence of heat-source alerts) (e.g., reducing exposure to toxins orcarcinogens), to conserve money and/or equipment life, to improvehealth, etc. For example, one challenge may involve participants turningdown their thermostat by one degree for one week. Those participantsthat successfully complete the challenge are rewarded, such as withcoupons, virtual currency, status, etc. Regarding compliance, an exampleinvolves a rental-property owner making a rule that no renters arepermitted to access certain owner's rooms. The devices in the roomhaving occupancy sensors may send updates to the owner when the room isaccessed.

In some embodiments, processing engine 306 integrates or otherwise usesextrinsic information 412 from extrinsic sources to improve thefunctioning of one or more processing paradigms. Extrinsic information412 may be used to interpret data received from a device, to determine acharacteristic of the environment near the device (e.g., outside astructure that the device is enclosed in), to determine services orproducts available to the user, to identify a social network orsocial-network information, to determine contact information of entities(e.g., public-service entities such as an emergency-response team, thepolice or a hospital) near the device, to identify statistical orenvironmental conditions, trends or other information associated with ahome or neighborhood, and so forth.

FIG. 5A illustrates a representative operating environment 500 in whicha hub server system 508 provides data processing for monitoring andfacilitating review of motion events in video streams captured by videocameras 118. As shown in FIG. 5A, the hub server system 508 receivesvideo data from video sources 522 (including cameras 118) located atvarious physical locations (e.g., inside homes, restaurants, stores,streets, parking lots, and/or the smart home environments 100 of FIG.1). Each video source 522 may be bound to one or more reviewer accounts,and the hub server system 508 provides video monitoring data for thevideo source 522 to client devices 504 associated with the revieweraccounts. For example, the portable electronic device 166 is an exampleof the client device 504.

In some implementations, the smart home provider server system 164 or acomponent thereof serves as the hub server system 508. In someimplementations, the hub server system 508 is a dedicated videoprocessing server that provides video processing services to videosources and client devices 504 independent of other services provided bythe hub server system 508.

In some implementations, each of the video sources 522 includes one ormore video cameras 118 that capture video and send the captured video tothe hub server system 508 substantially in real time. In someimplementations, each of the video sources 522 optionally includes acontroller device (not shown) that serves as an intermediary between theone or more cameras 118 and the hub server system 508. The controllerdevice receives the video data from the one or more cameras 118,optionally, performs some preliminary processing on the video data, andsends the video data to the hub server system 508 on behalf of the oneor more cameras 118 substantially in real time. In some implementations,each camera has its own on-board processing capabilities to perform somepreliminary processing on the captured video data before sending theprocessed video data (along with metadata obtained through thepreliminary processing) to the controller device and/or the hub serversystem 508.

As shown in FIG. 5A, in accordance with some implementations, each ofthe client devices 504 includes a client-side module 502. Theclient-side module 502 communicates with a server-side module 506executed on the hub server system 508 through the one or more networks162. The client-side module 502 provides client-side functionalities forthe event monitoring and review processing and communications with theserver-side module 506. The server-side module 506 provides server-sidefunctionalities for event monitoring and review processing for anynumber of client-side modules 502 each residing on a respective clientdevice 504. The server-side module 506 also provides server-sidefunctionalities for video processing and camera control for any numberof the video sources 522, including any number of control devices andthe cameras 118.

In some implementations, the server-side module 506 includes one or moreprocessors 512, a video storage database 514, device and accountdatabases 516, an I/O interface to one or more client devices 518, andan I/O interface to one or more video sources 520. The I/O interface toone or more clients 518 facilitates the client-facing input and outputprocessing for the server-side module 506. The databases 516 store aplurality of profiles for reviewer accounts registered with the videoprocessing server, where a respective user profile includes accountcredentials for a respective reviewer account, and one or more videosources linked to the respective reviewer account. The I/O interface toone or more video sources 520 facilitates communications with one ormore video sources 522 (e.g., groups of one or more cameras 118 andassociated controller devices). The video storage database 514 storesraw video data received from the video sources 522, as well as varioustypes of metadata, such as motion events, event categories, eventcategory models, event filters, and event masks, for use in dataprocessing for event monitoring and review for each reviewer account.

Examples of a representative client device 504 include, but are notlimited to, a handheld computer, a wearable computing device, a personaldigital assistant (PDA), a tablet computer, a laptop computer, a desktopcomputer, a cellular telephone, a smart phone, an enhanced generalpacket radio service (EGPRS) mobile phone, a media player, a navigationdevice, a game console, a television, a remote control, a point-of-sale(POS) terminal, vehicle-mounted computer, an ebook reader, or acombination of any two or more of these data processing devices or otherdata processing devices.

Examples of the one or more networks 162 include local area networks(LAN) and wide area networks (WAN) such as the Internet. The one or morenetworks 162 are, optionally, implemented using any known networkprotocol, including various wired or wireless protocols, such asEthernet, Universal Serial Bus (USB), FIREWIRE, Long Term Evolution(LTE), Global System for Mobile Communications (GSM), Enhanced Data GSMEnvironment (EDGE), code division multiple access (CDMA), time divisionmultiple access (TDMA), Bluetooth, Wi-Fi, voice over Internet Protocol(VoIP), Wi-MAX, or any other suitable communication protocol.

In some implementations, the hub server system 508 is implemented on oneor more standalone data processing apparatuses or a distributed networkof computers. In some implementations, the hub server system 508 alsoemploys various virtual devices and/or services of third party serviceproviders (e.g., third-party cloud service providers) to provide theunderlying computing resources and/or infrastructure resources of thehub server system 508. In some implementations, the hub server system508 includes, but is not limited to, a handheld computer, a tabletcomputer, a laptop computer, a desktop computer, or a combination of anytwo or more of these data processing devices or other data processingdevices.

The server-client environment 500 shown in FIG. 5A includes both aclient-side portion (e.g., the client-side module 502) and a server-sideportion (e.g., the server-side module 506). The division offunctionalities between the client and server portions of operatingenvironment 500 can vary in different implementations. Similarly, thedivision of functionalities between the video source 522 and the hubserver system 508 can vary in different implementations. For example, insome implementations, client-side module 502 is a thin-client thatprovides only user-facing input and output processing functions, anddelegates all other data processing functionalities to a backend server(e.g., the hub server system 508). Similarly, in some implementations, arespective one of the video sources 522 is a simple video capturingdevice that continuously captures and streams video data to the hubserver system 508 without no or limited local preliminary processing onthe video data. Although many aspects of the present technology aredescribed from the perspective of the hub server system 508, thecorresponding actions performed by the client device 504 and/or thevideo sources 522 would be apparent to ones skilled in the art withoutany creative efforts. Similarly, some aspects of the present technologymay be described from the perspective of the client device or the videosource, and the corresponding actions performed by the video serverwould be apparent to ones skilled in the art without any creativeefforts. Furthermore, some aspects of the present technology may beperformed by the hub server system 508, the client device 504, and thevideo sources 522 cooperatively.

It should be understood that operating environment 500 that involves thehub server system 508, the video sources 522 and the video cameras 118is merely an example. Many aspects of operating environment 500 aregenerally applicable in other operating environments in which a serversystem provides data processing for monitoring and facilitating reviewof data captured by other types of electronic devices (e.g., smartthermostats 102, smart hazard detectors 104, smart doorbells 106, smartwall plugs 110, appliances 112 and the like).

The electronic devices, the client devices or the server systemcommunicate with each other using the one or more communication networks162. In an example smart home environment, two or more devices (e.g.,the network interface device 160, the hub device 180, and the clientdevices 504-m) are located in close proximity to each other, such thatthey could be communicatively coupled in the same sub-network 162A viawired connections, a WLAN or a Bluetooth Personal Area Network (PAN).The Bluetooth PAN is optionally established based on classical Bluetoothtechnology or Bluetooth Low Energy (BLE) technology. This smart homeenvironment further includes one or more other radio communicationnetworks 162B via which at least some of the electronic devices 522-mexchange data with the hub device 180. Alternatively, in somesituations, some of the electronic devices 522-m communicate with thenetwork interface device 160 directly via the same sub-network 162A thatcouples devices 160, 180 and 504-m. In some implementations (e.g., inthe network 162C), both the client device 504-m and the electronicdevices 522-n communicate directly via the network(s) 162 withoutpassing the network interface device 160 or the hub device 180.

In some implementations, during normal operation, the network interfacedevice 160 and the hub device 180 communicate with each other to form anetwork gateway through which data are exchanged with the electronicdevice 522-n. As explained above, the network interface device 160 andthe hub device 180 optionally communicate with each other via asub-network 162A. However, a provisioning process is required toestablish the communication between the network interface device 160 andthe hub device 180 via the sub-network 162A. Specifically, a new hubdevice 180 has to receive a network identification and a networkpassword associated with the sub-network 162A, such that the hub device180 could communicate device information of the hub device 180 to theserver 508 and allow the server 508 to associate the hub device 180 withone or more user accounts.

In some implementations, at least an optical link is formed between theclient device 504-m and the hub device 180. The client device 504-m isconfigured to generate optical data (e.g., light flashes) coded withnetwork information and user account information. The hub device 180includes a light sensor that captures the optical data and recovers thenetwork and user account information. Then, the hub device 180 uses therecovered network and user account information to access the sub-network162A, the network(s) 162 and the server 508 and associate with a useraccount on the server 508.

FIG. 5B is a block diagram of a Revolv Home Automation System inaccordance with some embodiments of the application. The Revolv HomeAutomation System is an example of a smart home environment 100. RevolvHome Automation System includes a set of hardware and software thatallows for secure local and remote control of home automation devices. Atypical setup comprises a Gateway that resides within the LAN of auser's home to communicate with various HA Devices, Revolv's Cloudservices which enable remote access, and mobile Apps and other Clientswhich allow users to interact with the system. These components interactwith each other using Apache Thrift, an IDL and binary protocol whichensures correctby-design communications. This document describes thesystem and the Thrift protocol needed to set up and control the Revolvsystem.

A Gateway represents a single Revolv hardware Gateway. It is broughtonline through the FlashLink commissioning process, at which point it isalso associated with an App. The Gateway is Revolv's hardware which istypically joined to a user's WiFi router within their home. Itcommunicates with the Devices within the user's home directly viavarious radio protocols, and through the LAN to IP-based devices. TheGateway is the main command and control center of the System, includingcommand queuing, scenes, and the rules engine for automating devices.

The Cloud facilitates communications and persistence between Clients andthe Gateway, and comprises Revolv's restful service called Sugarmill,and a third-party PubSub service called PubNub. Sugarmill providescomponent authentication, authorization, and persistence of allrelational data that can be accessed regardless of the online state ofthe various components. For example, a Client can access the Gateways itis connected to, Devices on each Gateway, and access and modify Rulescontrolling those devices even if the Gateway itself is disconnected.Sugarmill uses standard HTTPS endpoints with POST, PUT, and DELETEmethods.

Beyond the standard endpoints used for normal user operation, Sugarmillprovides a set of admin endpoints used for management of multiplesystems. This is used by Revolv customer support, but certain of thesecan be exposed as needed via developer key.

All real time command and control is done over PubNub, a third-partysolution which provides secure, reliable real time message passing withminimal latency over the internet. This allows normal remote Revolvcommunication to operate in an efficient asynchronous manner, whilekeeping all system components up-to-date with the current state. It alsooptimizes battery and data usage on mobile devices. Revolv also offers amore direct socket mode which can be used for even faster communicationswhen a Client is operating locally within the same LAN as the Gateway.

A Device represents a single physical controllable piece of homeautomation hardware, such as a switch or a lock. Devices are tied to asingle Gateway. Devices have a deviceType field, which describes at ahigh level what the Device is, and a set of Features that describe thecapabilities of the device. For example, two Devices may have On/Off andLevel features, but one could have a device Type of LIGHT (i.e. a lightbulb) and the other SWITCH (i.e. a wall dimmer). The Device id is theidentifier used for accessing and controlling the Device.

On the Client side, Revolv offers an iOS and an Android app designed foruser-friendly operation of the Revolv system. Each of these is built ontop of a platform specific SDK, which Revolv will provide to thirdparties for building their own clients. The Android SDK is built on topof a Java SDK, which allows command and control of Revolv from any JVMbased platform. The SDK's generally manage all of the communicationsbetween the Client, Cloud, and Gateway, providing the developer with asimple live data model to operate upon.

All interfaces and data objects used in the system are described by anApache Thrift definition. These compile to language specific bindingsthat are available for most commonly used languages, and provide acompact and correctby-design protocol for the Revolv system. While theSDKs hide much of the detail around building and manipulating Thriftobjects for most Client's needs, it is necessary to understand theThrift when building administrative applications that fall outside ofthe normal end user use cases.

Revolv's Thrift definition is split into files by functional unit, withdata model, real-time (PubNub), and Sugarmill request interfacesrequired for a given unit maintained in one file. A maven build file isincluded in the source repository, which first combines these into asingle Thrift file with all dependency ordering handled, then buildlanguage bindings for Java, Objective C, Python, Go, and JavaScript.Thrift also supports many other language bindings.

A Thrift definition comprises structs, unions, and enums, and also hassets, lists, and maps for collection objects. Most fields are optional,so it is easy to pass partial values for an object and have therecipient detect empty fields.

FIG. 6 is a block diagram illustrating a representative hub device 180in accordance with some implementations. In some implementations, thehub device 180 includes one or more processing units (e.g., CPUs, ASICs,FPGAs, microprocessors, and the like) 602, one or more communicationinterfaces 604, memory 606, radios 640, light sensor 650, and one ormore communication buses 608 for interconnecting these components(sometimes called a chipset). In some implementations, the hub device180 includes one or more input devices 610 such as one or more buttonsfor receiving input. In some implementations, the hub device 180includes one or more output devices 612 such as one or more indicatorlights, a sound card, a speaker, a small display for displaying textualinformation and error codes, etc. Furthermore, some the hub device 180uses a microphone and voice recognition or a camera and gesturerecognition to supplement or replace the keyboard. In someimplementations, the hub device 180 includes a location detection device614, such as a GPS (global positioning satellite) or other geo-locationreceiver, for determining the location of the hub device 180.

The radios 640 enable one or more radio communication networks in thesmart home environments, and allow a hub device 180 to communicate withsmart devices. In some embodiments, the radios 640 are capable of datacommunications using any of a variety of custom or standard wirelessprotocols (e.g., IEEE 802.15.4, Wi-Fi, ZigBee, 6LoWPAN, Thread, Z-Wave,Bluetooth Smart, ISA100.11a, WirelessHART, MiWi, etc.) custom orstandard wired protocols (e.g., Ethernet, HomePlug, etc.), and/or anyother suitable communication protocol, including communication protocolsnot yet developed as of the filing date of this document. The lightsensor 650 senses light flashes from a device that is placed inproximity to the light sensor 650.

Communication interfaces 604 include, for example, hardware capable ofdata communications using any of a variety of custom or standardwireless protocols (e.g., IEEE 802.15.4, Wi-Fi, ZigBee, 6LoWPAN, Thread,Z-Wave, Bluetooth Smart, ISA100.11a, WirelessHART, MiWi, etc.) and/orany of a variety of custom or standard wired protocols (e.g., Ethernet,HomePlug, etc.), or any other suitable communication protocol, includingcommunication protocols not yet developed as of the filing date of thisdocument.

Memory 606 includes high-speed random access memory, such as DRAM, SRAM,DDR RAM, or other random access solid state memory devices; and,optionally, includes non-volatile memory, such as one or more magneticdisk storage devices, one or more optical disk storage devices, one ormore flash memory devices, or one or more other non-volatile solid statestorage devices. Memory 606, or alternatively the non-volatile memorywithin memory 606, includes a non-transitory computer readable storagemedium. In some implementations, memory 606, or the non-transitorycomputer readable storage medium of memory 606, stores the followingprograms, modules, and data structures, or a subset or superset thereof:

-   -   Operating logic 616 including procedures for handling various        basic system services and for performing hardware dependent        tasks;    -   Hub communication module 618 for connecting to and communicating        with other network devices (e.g., network interface 160, such as        a router that provides Internet connectivity, networked storage        devices, network routing devices, server system 508, etc.)        connected to one or more networks 162 via one or more        communication interfaces 604 (wired or wireless);    -   Radio Communication Module 619 for connecting the hub device 180        to other client devices (e.g., controller devices, smart devices        204 in smart home environment 100) via one or more radio        communication devices (e.g., radios 640)    -   Hub provisioning module 620 for provisioning the hub and        electronic devices, which optionally includes: an account hub        device link module (not shown) for associating one or more        electronic devices 522 or hub 180 with a corresponding user        account, and a secure network setup module (not shown) for        setting up secure network connections for both the hub and the        electronic devices;    -   Device addition module 622 for adding a new electronic device        (e.g., smart device 204-1 in smart home environment 100 in        FIG. 1) after a hub has been properly set up;    -   User interface module 624, including but not limited to:        -   Hub provisioning interface 6242 for providing and displaying            a user interface during the device provisioning process            (e.g., performed by hub provisioning module 620);        -   Sensor addition interface 6244 for providing and displaying            a user interface when a new device is being added (e.g.,            performed by device addition module 622); and        -   Sensor control interfaces 6246 for providing and displaying            a user interface in which settings, captured data, and/or            other data for one or more sensor devices (e.g., light            sensor 650) can be modified and/or viewed;    -   High-level sensor feature module 626, including but not limited        to:        -   Temperature profile control module 6262 for creating and            maintaining temperature profiles of one or more devices            (e.g., one or more smart devices in smart home environment            100), wherein temperature profiles include operations            settings (e.g., scheduling) for manipulating the temperature            of the one or more devices;        -   Sunrise/sunset dependent device control module 6264 for            computing (e.g., based on information retrieved from            geo-information dependent device control module 6266, and/or            location dependent device control module 6268) sunrise            and/or sunset times, and accordingly adjusting operations            settings for one or more smart devices (e.g., dimming a            light, closing a smart curtain, adjusting a thermostat,            etc.);        -   Geo-information dependent device control module 6266 for            detecting surrounding environmental characteristics of hub            device 180, such as information of surrounding terrain            (e.g., mountain ranges, desert, etc.) and/or nearby            obstructions (e.g., tall buildings, trees, etc.);        -   Location dependent device control module 6268 for detecting            a location of hub device 180 (e.g., GPS coordinates);    -   Sensor communication management module 628, including but not        limited to:        -   Queue filtering module 6281 for manipulating and processing            commands received from one or more devices (e.g., splitting            commands into commands for specific devices, translating            commands in accordance with protocols of corresponding            devices, etc.)        -   Queue ordering module 6282 for determining an order of            commands (e.g., received and processed by queue filtering            module 6281) in a command queue of hub device 180;        -   Adaptive polling module 6283 for storing device information            (e.g., device type, protocol, application state, changes to            device state, time of last poll, etc. of smart devices in            smart home environment 100, FIG. 1), configuring polling            modes (e.g., frequency of polling), and sending polling            commands to the one or more devices;        -   Wi-Fi Status monitoring module 6284 for determining a status            of one or more communication interfaces 604 (e.g., Wi-Fi);        -   Synchronization module 6285 for receiving messages from, and            transmitting messages to, one or more devices (e.g., smart            devices in smart home environment 100, FIG. 1), wherein            messages include control requests (e.g., a command to adjust            thermostat), responses, and state information (e.g.,            information conveying changes in device state); and    -   Hub database 630, including but not limited to:        -   Sensor information 632 for storing and managing data            received, detected, and/or transmitted by one or more            sensors (e.g., light sensor 650) of hub device 180; and        -   Device communication protocol information 634 for storing            and managing protocol information for one or more protocols            (e.g., standard wireless protocols, such as ZigBee, Z-Wave,            etc., and/or custom or standard wired protocols, such as            Ethernet).

Each of the above identified elements (e.g., modules stored in memory206 of hub device 180) may be stored in one or more of the previouslymentioned memory devices (e.g., the memory of any of the smart devicesin smart home environment 100, FIG. 1), and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures, or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various implementations. In some implementations, memory606, optionally, stores a subset of the modules and data structuresidentified above. Furthermore, memory 606, optionally, stores additionalmodules and data structures not described above.

FIG. 7 is a block diagram illustrating the server system 508 inaccordance with some implementations. The server system 508, typically,includes one or more processing units (CPUs) 702, one or more networkinterfaces 704 (e.g., including I/O interface to one or more clients 86and I/O interface to one or more the electronic devices), memory 116,and one or more communication buses 708 for interconnecting thesecomponents (sometimes called a chipset). Memory 706 includes high-speedrandom access memory, such as DRAM, SRAM, DDR RAM, or other randomaccess solid state memory devices; and, optionally, includesnon-volatile memory, such as one or more magnetic disk storage devices,one or more optical disk storage devices, one or more flash memorydevices, or one or more other non-volatile solid state storage devices.Memory 706, optionally, includes one or more storage devices remotelylocated from one or more processing units 118. Memory 706, oralternatively the non-volatile memory within memory 706, includes anon-transitory computer readable storage medium. In someimplementations, memory 706, or the non-transitory computer readablestorage medium of memory 706, stores the following programs, modules,and data structures, or a subset or superset thereof:

-   -   Operating system 710 including procedures for handling various        basic system services and for performing hardware dependent        tasks;    -   Network communication module 712 for connecting the server        system 508 to other client devices (e.g., the client devices and        the electronic devices (including e.g., cameras) connected to        one or more networks 162 via one or more network interfaces 704        (wired or wireless);    -   Server-side module 506, which provides server-side        functionalities for account management, device provision, device        control, data processing and data review, including but not        limited to:        -   Account administration module 714 for creating user            accounts, and providing account login-services to client            devices;        -   Hub and device provisioning module 716 for provisioning hubs            and smart devices (sometimes in cooperation with the account            registration module 714), which optionally includes: an            account hub device link module (not shown) for associating            one or more smart devices 204 (e.g., electronic devices 522            or hub 180 with a corresponding user account, a secure            network setup module (not shown) for setting up secure            network connections for both the hub and the smart devices,            and a device addition module (not shown) for adding a new            smart electronic device after a hub has been properly set            up;        -   Data receiving module 722 for receiving data (e.g., video            data) from smart devices via the hub device, and preparing            the received data for further processing and long-term            storage in the data storage database 120;        -   Hub and device control module 724 for generating and sending            server-initiated control commands to modify operation modes            of the smart devices, and/or receiving and forwarding            user-initiated control commands to modify operation modes of            the smart devices, wherein the hub and device control module            86 at least includes a device communication management            module 7242;        -   Data processing module 726 for processing the data provided            by the smart devices such that the processed data could be            forwarded to a client device and reviewed by a user who logs            onto a corresponding user account on the specific client            device, wherein in some implementations, the data processing            module 726 includes a high-level device feature module 7262;            and    -   server data 736 storing data for use in account management, hub        provision and control, device provision and control, data        processing and data review, including but not limited to:        -   Data storage database 120 for storing data associated with            each electronic device 802 (e.g., each camera) of each user            account, as well as data processing models, processed data            results, and other relevant metadata (e.g., names of data            results, location of electronic device 802, creation time,            duration, settings of the electronic device 802, etc.)            associated with the data, wherein (optionally) all or a            portion of the data and/or processing associated with the            hub 180 or smart devices stored securely;        -   Account database 516-1 for storing account information for            user accounts, including user account information,            information for linked hubs and smart devices (e.g., hub            identifications), hub specific secrets, relevant user and            hardware characteristics (e.g., service tier, device model,            storage capacity, processing capabilities, etc.), user            interface settings, data review preferences, etc., where the            information for associated smart devices includes, but is            not limited to, one or more device identifiers (e.g., MAC            address and UUID), device specific secrets, and displayed            titles; and        -   Device Information Database 516-2 for storing device            information related to one or more hub devices, e.g., device            identifiers and hub specific secrets, independently of            whether the corresponding hub devices have been associated            with any user account.

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures, or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various implementations. In some implementations, memory116, optionally, stores a subset of the modules and data structuresidentified above. Furthermore, memory 116, optionally, stores additionalmodules and data structures not described above.

FIG. 8 is a block diagram illustrating a representative client device504 associated with a user account in accordance with someimplementations. The client device 604, typically, includes one or moreprocessing units (CPUs) 802, one or more network interfaces 804, memory806, and one or more communication buses 808 for interconnecting thesecomponents (sometimes called a chipset). The client device also includesa user interface 810, a flash light 880, and one or more built-insensors 890 (e.g., accelerometer and gyroscope). User interface 810includes one or more output devices 812 that enable presentation ofmedia content, including one or more speakers and/or one or more visualdisplays. Optionally, output devices 812 (e.g., a visual display) isused for sending signals (e.g., to light sensor 650 of hub 180) during aprovisioning/commissioning process. User interface 810 also includes oneor more input devices 814, including user interface components thatfacilitate user input such as a keyboard, a mouse, a voice-command inputunit or microphone, a touch screen display, a touch-sensitive input pad,a gesture capturing camera, or other input buttons or controls.Furthermore, some the client devices use a microphone and voicerecognition or a camera and gesture recognition to supplement or replacethe keyboard. In some implementations, the client device includes one ormore cameras, scanners, or photo sensor units for capturing images, forexample, of graphic series codes printed on the smart devices.Optionally, the client device includes a location detection device 815,such as a GPS (global positioning satellite) or other geo-locationreceiver, for determining the location of the client device.

Memory 806 includes high-speed random access memory, such as DRAM, SRAM,DDR RAM, or other random access solid state memory devices; and,optionally, includes non-volatile memory, such as one or more magneticdisk storage devices, one or more optical disk storage devices, one ormore flash memory devices, or one or more other non-volatile solid statestorage devices. Memory 806, optionally, includes one or more storagedevices remotely located from one or more processing units 802. Memory806, or alternatively the non-volatile memory within memory 806,includes a non-transitory computer readable storage medium. In someimplementations, memory 806, or the non-transitory computer readablestorage medium of memory 806, stores the following programs, modules,and data structures, or a subset or superset thereof:

-   -   Operating system 816 including procedures for handling various        basic system services and for performing hardware dependent        tasks;    -   Network communication module 818 for connecting the client        device to other client devices (e.g., server system 508 and the        electronic devices) connected to one or more networks 162 via        one or more network interfaces 804 (wired or wireless);    -   Flash light module 820 for producing flashes of light (e.g., for        detection by light sensor 650 of hub 180) as signals during a        provisioning/commissioning process;    -   Input processing module 822 for detecting one or more user        inputs or interactions from one of the one or more input devices        814 and interpreting the detected input or interaction;    -   Phone orientation sensing module 824 for determining the        orientation of the client device 504 based on data sensed by the        built-in sensors 890;    -   One or more applications 826 for execution by the client device        (e.g., games, social network applications, smart home        applications, and/or other web or non-web based applications)        for controlling hubs and electronic devices (e.g., sending        commands, configuring settings, etc.) and for reviewing data        captured by the electronic devices (e.g., device status and        settings, captured data, or other information regarding the hub        or other connected devices);    -   Client-side module 502, which provides client-side        functionalities for device provisioning, device control, data        processing and data review, including but not limited to:        -   Account registration module 828 for establishing a user            account;        -   Hub and device provisioning module 830 that provisions hubs            and electronic devices (sometimes in cooperation with the            account registration module 828) and includes an account hub            device link module 834 for associating one or more            electronic devices 522 or hub 180 with a corresponding user            account, a secure network setup module 836 for setting up            secure network connections for both the hub and the            electronic devices, and a device addition module 832 for            adding a new smart electronic device after a hub has been            properly set up;        -   Hub and device control module 838 for generating control            commands for modifying an operating mode of the hub or the            electronic devices in accordance with user input; and        -   Data review module 840 for providing user interfaces for            reviewing the data that are processed by server system 508            and displayed on the display of the client device; and    -   client data 860 storing data associated with the user account        and electronic devices, including, but is not limited to:        -   Account data 862 storing information related with both user            accounts loaded on the client device 604 and electronic            devices 522 associated with the user accounts, wherein such            information includes cached login credentials, hub            identifiers (e.g., MAC addresses and UUIDs), electronic            device identifiers (e.g., MAC addresses and UUIDs), user            interface settings, display preferences, authentication            tokens and tags, password keys, etc.; and        -   Local data storage database 864 for selectively storing raw            or processed data associated with electronic devices 522            (e.g., a camera) that has been linked to the user accounts.

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures, modules or datastructures, and thus various subsets of these modules may be combined orotherwise re-arranged in various implementations. In someimplementations, memory 806, optionally, stores a subset of the modulesand data structures identified above. Furthermore, memory 806,optionally, stores additional modules and data structures not describedabove.

In some implementations, at least some of the functions of the serversystem 508 are performed by the client device 604, and the correspondingsub-modules of these functions may be located within the client devicerather than server system 508. In some implementations, at least some ofthe functions of the client device are performed by the server system508, and the corresponding sub-modules of these functions may be locatedwithin the server system 508 rather than client device 604. The clientdevice 604 and the server system 508 shown in FIGS. 7 and 8,respectively, are merely illustrative, and different configurations ofthe modules for implementing the functions described herein are possiblein various implementations.

FIG. 9A is an example diagram illustrating information flow during thecourse of commissioning a hub device 180 (e.g., hub device 904) in anoperating environment as shown in FIG. 5A in accordance with someimplementations. Prior to commissioning a new hub device 904 for securecommunication in the smart home environment, a user registers a useraccount on a client-side application associated with the hub device 904,and logs onto the user account on a client device 902. In someimplementations, after the new hub device 904 is plugged onto a walloutlet (i.e., after it is powered up), the hub device 904 broadcasts(960) a readiness indicator signal 920. For example, the hub device 904includes a LED light indicator that stays on, shines with a specificcolor (e.g., green), or flashes with a light pattern, when the hubdevice 904 is ready for a commissioning process. In some situations, theclient device 902 is required to receive the readiness indicator 920prior to commissioning the hub device 904.

The client device 902 generates optical signals that are encoded withspecific communication data, and broadcasts (962) the encoded opticalsignals to the hub device 904. In a specific example, the flash light ora display screen of the client device 902 is flashed to deliver theencoded optical signals to a light sensor on the hub device 904. Theclient device 902 is flipped over to face downward, and placed in closeproximity to the light sensor on the hub 904. In some implementations, abuilt-in mechanical sensor (e.g., an accelerometer or a gyroscope)detects that the user has flipped over the client device 902, andautomatically initializes the device commissioning process for the hubdevice 904.

The specific communication data include one or more of networkcredentials, user account information, user/device authenticationinformation and integrity check data. In one situation, the hub device904 scans to obtain a network identification 926, and the client device902 provides network passwords to allow the hub device 904 to access thecorresponding network. Alternatively, in another situation, both networkidentification and network password are provided by the client device902 via the optical link.

In some implementations, Hub cannot search for a service set identifier(SSID) as they may be hidden, so we send both the SSID and the password.One mechanism for shortening the message even more is creating a 2 bytehash of the SSID and sending that instead of the full SSID, and havingthe hub determine SSID from its own scan; in the end it was simpler justto send the full SSID. The essence of the authentication part of theinvention is that we DON'T have to send complicated authenticationinformation for connecting to the service and the app. Instead we usethe entropy of the SSID and password of the WiFi network, and a small 2byte authentication token (e.g., salt) to create a unique secureauthentication token which is then used to connect the Hub with theapplication in the Server. The user never needs to create an accountwith credentials to make this system work, which simplifies the setup.Once the link is made, all further data is sent over the network linkwithout any further use of the optical link (although additional phonescan subsequently commission to the Hub with the same mechanism).

After receiving the encoded optical signals, the hub device 904generates a link approval request 924, including user accountinformation and hub information. The hub information includes a hubidentifier, e.g., a serial number, a media control access (MAC) address,and a universally unique identifier (UUID). The hub device 904 then usesthe network credentials to access the secure network thatcommunicatively couples the hub device 904 to a hub server 906, andsends (968) the link approval request 924 to the hub server 906 via thesecure network.

Upon receiving the link approval request 924, the hub server 906 checksa hub information database to identify a hub status 930 for the hubdevice 904 according to the hub information. The hub status 930 isoptionally new but available, not sold yet (i.e., need to buy from a hubprovider), and existing. An existing hub has been commissioned inanother smart home environment, and associated with another useraccount. In some implementations, the hub server 906, on behalf theclient device 902, sends a request to link to an existing hub 934 to theother user account, and provides an invite code to the client device 902if the other user account approves sharing of the existing hub with theclient device 902. Alternatively, if the hub device 904 is new andavailable, the hub server 906 associates (970) the hub device 904 withthe user account on the client device 902, stores the hub information928 in association with the hub device 904 in its account database, andreturns (972) a link approval response 932.

In some implementations, a user of the client device 902 intends to linkher user account with an existing hub. The client device 902 issues(974) a hub link request 934 to the hub server 906. The hub server 906forwards the hub link request 934 to another user account that iscurrently in charge of the hub device 904, and returns (976) an invitecode to the client device 902 if the other user account approves sharingof the existing hub with the client device 902. When the client device902 uses the invite code to commission the existing hub, the hub server906 associates the hub device 904 with the user account on the clientdevice 902, stores the hub information 928 in association with the hubdevice 904 in its account database, and returns a link approval response932.

When the client device 902 receives the link approval response, the useraccount logged onto by the user is associated with the hub device 904,and a representation of the hub device 904 is displayed on the userinterface of the client device 902 to represent the hub device 904.

FIG. 9B is an example flow diagram for commissioning a hub device in anoperating environment as shown in FIG. 5A in accordance with someimplementations. When a new application comes online, a user makes arequest at the client device to register and get a unique identification(ID) along with information of an application notification channel. Theapplication at the client device uses a flash link to connect to thegateway (e.g., hub device 704), and uses the same information to createa flash link hash to authenticate that the application can connect tothe gateway through the cloud (e.g, hub server 706). The flash linkcommunication (as explained in FIG. 9A) contains a command, SSID (orshort hash thereof), password, and an authentication token (also calledas a salt in this application). The authentication token is used touniquely identify a user account of a client-side application. In someimplementations, the authentication token is provided by a serverassociated with a hub device. To notify the application when thecommissioning is successful, the cloud sends over a message (e.g.,“gwcomm success”) to the application over the pubnub Channel createdwhen the application first registers. At the end, the cloud sends overgw-notification, gw-to-app and app-to-gw (pub nub) channels to thegateway. The cloud also sends over gw-to-app and app-to-gw (pub nub)channels to the application.

An example appcomm call is reproduced as follows:

{  ″commissioningKey″: ″IW2kM4Ezsn″,  ″geoPoint″ : {   ″latitude″ :47.6838,   ″longitude″ : −122.301  } }

An example ack Response is reproduced as follows:

{  ″location″ : {   ″geoPoint″ : {    ″latitude″ : 47.6838,   ″longitude″ : −122.301   },   ″street″ : ″7523 25th Ave NE″,   ″city″: {    ″name″ : ″Seattle″,    ″principalSubdivision″ : {     ″country″ :{      ″name″ : ″United States of America″,      ″code″ : ″US″     },    ″code″ : ″WA″,     ″name″ : ″Washington″    }   },   ″postalCode″ :″98115″  },  ″channel″: ″f2952c3c-ec3f-4032-a965-43cd2a372a32″ }

As shown below in Table 1, an example optical data item includes aplurality of constants (e.g., Frame bits, Command, SSID, PW length,Salt, and CRC) and a password. The plurality of constants shares sixbytes of the optical data item, and the password optionally has avariable length). Such an optical data item is encoded in an opticalsignal and communicated from the client device 902 to the hub device 904via an optical communication path.

TABLE 1 An Optical Data Item Cyclic Redun- dancy PW Check Frame CommandSSID Length Password Salt (CRC) Frame 4 bits 1 byte 1 byte 1 byteEncoded 1 1 byte 4 hash String byte bits 0x6 0x20 0xA3 0x05 “mypwd” 0x820x99 0x6

Further, in some implementations, the data is a Manchester encoded datastream, operating at a variable rate from 10-60 Hz with a sync bytepattern to frame the message. On top of that we added a very simpleprotocol for passing the SSID, password, and salt; if it's interesting,it just includes SYNC, LEN, VER/TYPE, and PAYLOAD. SYNC is 0xFE. LENcovers VER/TYPE and PAYLOAD. For VER/TYPE, the most significant nibbleis a version field, and the least significant nibble is MSGTYPE. Forexample, VER/TYPE could include VER 0x0 and MSGTYPE (lower nibble), andMSGTYPE (lower nibble) further include:

-   -   0x00—plaintext to be printed as a debug message    -   0x01—reserved    -   0x02—salt, data is 2 byte signed integer    -   0x03—SSID string (no null termination—length based)    -   0x04—Network password string (no null termination—length based)

In another example, VER 0x1 . . . 0xF is reserved, and future versionsmay incorporate a CRC as the last byte of the PAYLOAD.

FIG. 9C is an example flow diagram for commissioning a hub device with afailure in an operating environment as shown in FIG. 5A in accordancewith some implementations. Commissioning can fail in several ways suchthat the hub device 904 could not connect to the cloud. The hub device904 includes one or more LED light indicators that are configured toprovide blink codes as user remedies messages. In some implementations,the blink codes emitted by the LED light indicators are garbled, andindicate that a CRC failure occurs in the commissioning process. In someimplementations, the LED light indicators blink in yellow to indicatethat the hub device 904 is trying to receive data, and goes to solidyellow when the hub device 904 receives a coherent message.

In some implementations, the LED light indicators alternate betweenyellow and white blinks to indicate that a WiFi connection has failed.The commissioning process is therefore canceled, and the user isrequested to enter a new network name or a new network password. In someimplementations, when a connection to the cloud fails, the user needs tocheck the Internet and gateway, and give another try to connect to thecloud.

In some implementations, the LED light indicators blink in white toindicate that the Internet is down, and turn to solid white when theInternet connection is good. In some situations, a timeout occurs in thecommissioning process because the application or the cloud does notrespond.

In some implementations, when the cloud (e.g., the hub server 906) failsto validate the gateway serial number, it sends a failure notificationto both the gateway (e.g., the hub device 904) and the application atthe client device 902.

Specifically, in some implementations, after the hub device 180 iscommunicatively coupled to the hub server system 508, communication isestablished between the hub device 180 and one or more smart electronicdevices (e.g. devices 102-118) via radio communication networksavailable in the local smart home environment 100.

Each of a client device 902, a hub device 904 and a hub server 906 hasone or more processors, and memory storing one or more programs forexecution by the one or more processors of the respective device orserver. The one or more programs of the respective device or serverinclude instructions for implementing operations shown in FIGS. 9A-9C tocommission a new hub device in a smart home environment.

FIG. 9D is a flow chart for an example method 980 of commissioning anelectronic device (e.g., a hub device 180 or 904) in a smart homeenvironment in accordance with some implementations of the application.The method 980 is implemented at the electronic device, and theelectronic device have one or more processors, and memory storing one ormore programs for execution by the one or more processors. Deviceidentification information associated with the electronic device isstored in the memory of the electronic device (e.g., as part of thedevice information 632 stored in the hub database 632 of the hub device180). In some implementations, the device identification informationincludes a device identification identifier represented by one of aserial number, a media control access (MAC) address, and a universallyunique identifier (UUID).

The electronic device receives (982) from a client device one-waysignals that are encoded with communication data. The client device islocated (984) in proximity to the electronic device. The client deviceis executing (986) a client-side application associated with a useraccount that generates the one-way signals. The encoded communicationdata includes (988) at least one or more network credentials of a localarea network and an authentication token, and the authentication tokenprovides sufficient information to identify the user account of theclient-side application. In some implementations, the one-way signalsare communicated via a communication path having a substantially narrowbandwidth. Further, in some implementations, the one-way signals includeoptical signals, and the client device is configured to provide theoptical signals by one of a flash light and a display screen of theclient device. In some implementations, prior to receiving the one-waysignals, the electronic device broadcasts a readiness indicator signal,wherein the readiness indicator signal indicates to the client devicethat the electronic device is ready for a commissioning process.Specifically, in an example, the electronic device includes a LED lightindicator that generates the readiness indicator signal, and inaccordance with the readiness indicator signal, the LED light stays on,shines with a specific color, or flashes with a light pattern.

In some implementations, the electronic device scans to obtain a networkidentification of the local area network, and the one or more networkcredentials include a network password associated with the networkidentification. In some implementations, the one or more networkcredentials include a network identification and a network password thatare associated with the local area network. Alternatively, in someimplementations, the one or more network credentials include a hashvalue associated with a network identification and a network passwordthat are used to access the local area network. The electronic devicedetermines locally at the electronic device the network identificationbased on the hash value.

Then, the electronic device generates (990) a link approval requestincluding at least the authentication token and the deviceidentification information, and the device identification information isobtained from the memory of the electronic device. In someimplementations, the authentication token has been provided by theserver to the client device, and the link approval request includes theauthentication token when it is sent to the server for authenticatingthe commissioning process.

The electronic device accesses (992) the local area network using theone or more network credentials provided by the client device. Theelectronic device sends (994) the link approval request to a server viathe local area network, and the server is configured (996) to confirmavailability of the electronic device for commissioning and to link theelectronic device with the user account according to the authenticationtoken and the device identification information.

In some implementations, the client device includes a sensor configuredto detect that the user has positioned the client device (e.g., flippedover the client device) for coupling the one-way signals to acorresponding sensor of the electronic device configured to detect theone-way signals, and automatically initializes the commissioning processfor the electronic device in response to the detecting. In an example,the built-in sensor includes at least one of an accelerometer and agyroscope.

In some implementations, the electronic device is an existing hub devicethat has been commissioned in another smart home environment orassociated with another user account, and the server is configured tosend the link approval response to the client device only when the otheruser account approves the link approval request.

In some implementations, after being commissioned in the smart homeenvironment, the electronic device establishes communication with one ormore smart devices via one or more communication networks. The one ormore communication networks are implemented based on at least onecommunication protocol of a group consisting of Insteon, IEEE 802.15.4,Wi-Fi, ZigBee, 6LoWPAN, Thread, Z-Wave, Bluetooth Smart, Bluetooth LowEnergy, ISA100.11a, WirelessHART, MiWi, OSIAN, Ethernet, and HomePlug.In some implementations, the one or more communication networks aredistinct from the local area network.

More details on the method 980 for commissioning the electronic devicein a smart home environment are explained above with reference to FIGS.9A-9C.

Another aspect of the application is directed to an electronic deviceincluding one or more processors, and memory storing one or moreprograms for execution by the one or more processors. The one or moreprograms include instructions causing the one or more processors toimplement the method 980 for commissioning the electronic device.Further, another aspect of the application includes non-transitorycomputer-readable storage medium storing one or more programs forexecution by one or more processors of an electronic device. The one ormore programs include instructions causing the one or more processors toimplement the method 980 for commissioning the electronic device.Specifically, for both the electronic device and the non-transitorycomputer-readable storage medium, the one or more programs include a hubcommissioning interface module 6242 and a hub commissioning module 620that function together to commission the hub device in the smart homeenvironment.

It should be understood that the particular order in which theoperations in FIG. 9D have been described are merely example and are notintended to indicate that the described order is the only order in whichthe operations could be performed. One of ordinary skill in the artwould recognize various ways to implement the respective smart deviceadding method as described herein. Additionally, it should be noted thatdetails of other processes described herein with respect to method 980(e.g., FIG. 9D) are also applicable in an analogous manner to the othermethods discussed in this application. For brevity, these details arenot repeated here.

FIG. 10 illustrates graphic user interfaces (GUI) displayed forcommissioning a hub and controlling smart devices that arecommunicatively coupled to the hub in accordance with someimplementations. The GUIs allow a user to interact with the hub andmonitor the commissioning/controlling status on the display of theclient device 902. When the hub is commissioned, the GUIs are refreshedto display different interfaces for controlling smart devices that arecoupled to the hub device 904 in different manners. Exemplary smartdevice control methods that are enabled by the GUIs include, but are notlimited to, geo-information dependent smart device control (see FIG.13), device location dependent device control (see FIG. 15), andtimeline/event dependent device control (see FIGS. 14A and 14B).

FIGS. 11A-11G are example GUIs displayed for commissioning a hub inaccordance with some implementations. Prior to commissioning a new hubdevice 904 for secure communication in the smart home environment, auser installs a client-side hub application associated with the hubdevice 904, registers a user account on the application, and logs ontothe user account on the client device 902. A GUI display 1102 is used toremind the user that if she has the hub device 904 at her hand, the hubdevice 904 needs to be connected with a power outlet.

A GUI display 1104 is presented to the user for the purpose of couplingthe user account to a hub device 904. As explained above with referenceto FIG. 9, the hub device 904 has three possible statuses: new butavailable, not sold yet (i.e., need to buy from a hub provider), andexisting. Three information items are displayed on the GUI display 1104to allow the user to select the hub status associated with the hubdevice 904. If a first user action is received to commission an existinghub device, the GUI display 1106 is presented to prompt the user toenter a hub invite code provided by a hub owner out of the hubapplication. In some implementations, the user could send a hub linkrequest to the hub owner to obtain the invite code within the hubapplication. If a second user action is received to buy a new hub, theGUI display 1108 is presented to allow the user to buy a new hub onsite.

If a third user action is received to commission a new and available hubdevice 904, the GUI displays 1110, 1112 and 1114 are used to guide theuser. Specifically, the example instructions include: “Hold your phone'sFLASH a few inches above the hub's center,” “Tilt Down,” “We're busydoing science. Wait for the hub's light to Turn White” and “Tap if HubStarts Blinks.” The GUI displays 1110 also shows the commissioningstatus messages, such as “Engage Flashlink.” For the purpose ofcommissioning the hub device 904, the GUI display 1116 prompts the userto enter the network credentials.”

In some implementations, the client device 902 receives feedback signalsfrom the hub device 904. Specifically, the hub device 904 includes oneor more LED indicators. The GUI displays 1118-1126 requests a user inputof the color of the one or more LED indicators the user observes, anduses the user's color input to determine whether the hub device 904 hasbeen properly commissioned. For instance, if the color is yellow, theGUI display 1122 displays a warning message to check whether the userhas inputted the network credentials correctly.

For a hub device (e.g., a hub device applied in a Revolv Home AutomationSystem), an important part of the Revolv-based system was the process bywhich users added a smart device to their hub. The details of adding adevice vary both with protocol and with each individual device but wetried to hide as much of this complexity as possible from the user.

The hub as originally released supported adding devices using the WiFi,Insteon and ZWave radios. The goal was to “magically” automaticallydiscover all the smart devices the user has in their home, withoutrequiring any action from the user. The devices would just appear in theRevolv app as soon as they were present in the home. The degree to whichwe achieved this goal varied by device.

-   -   Sonos, WeMo: With these devices we fully achieved our goal of no        user action.    -   Hue, Nest: These devices were discovered automatically but user        action was then required to complete the process. For Hue this        action was pushing the button on the Hue bridge, for Nest this        action was entering account details.    -   Insteon: These devices required the user to enter “add device”        mode in the Revolv app, then push a button on the Insteon        device.    -   Z-Wave: As with Insteon, then the Revolv app prompted the user        to push the button on the device a second time to complete the        process.

The hub used various mechanisms internally to achieve the userexperience described above. Some of these were running in the backgroundand some would only run when the hub was put into a discovery mode by auser going to the “add device” screen in the app. This discovery modewas shared by all protocols—the user did not need to select the protocolor type of the device they wanted to add.

On the WiFi radio, a background arp-scan was run periodically using theLinux tool arping to gather the MAC addresses of all devices on the WiFinetwork. These MAC addresses were then used to recognize supporteddevice manufacturers. UPnP discovery was run periodically, and morefrequently when in discovery mode. Periodically connect to devicemanufacturer's Internet servers (e.g., Philips Hue) to query devices inthe home.

On the Insteon radio, when the hub is in discovery mode, send a “startlink” message.

On the Z-Wave radio, the Z-Wave protocol normally requires the user toindicate whether they are adding (including) or removing (excluding) adevice. To avoid our users having to make this protocol-specificdecision, when the hub is in discovery mode, we put the Z-Wave radio inexclude mode. The hub then detects when the device has been excludedfrom its previous network, puts the Z-Wave radio in include mode, andprompts the user to interact with the device a second time to completethe inclusion process.

Our goal was to allow a device to be added without requiring the user tospecify the device. However, we also provided a searchable list ofsupported devices with detailed instructions for adding each device.This was especially helpful for devices that required a series ofbuttons to be pressed, with a wizard in the Revolv app to walk the userthrough the steps, and put the hub into the correct mode for each step.

A hub device 904 (e.g., a Revolv Hub) is configured to connect to manyexisting devices on the market today, with new devices continuouslybeing added. To add a new smart device via the hub device 904, aclient-side application is executed on a client device 902, and providesuser interfaces including on-screen instructions for commissioning thenew smart device. In some situations, the user needs to locate the“join” button on the new smart device.

The client-side application also provides instructions for un-joiningthe device from the hub device. In some implementations, a smart devicecannot be completely unjoined from the client-side application.Optionally, the user can “hide” the smart device that has been joinedfrom a Home screen (e.g., a dashboard user interface 1200 or aninventory user interface 1204) by un-starring it in the device list. Insome implementations, the user deletes a smart device that has beenjoined from the client-side application by performing a Hub Resetfunction and making all smart devices that has been joined to start overagain.

FIGS. 12A-12G are example GUIs displayed for adding and controllingsmart devices (sometimes also called as sensors) that arecommunicatively coupled to a hub in accordance with someimplementations. In accordance with these GUIs, smart devices associatedwith different device types and commissioning options can beconveniently added via consistent user interfaces on a client-sideapplication (e.g., an application 826 implemented by a hub and devicecommissioning module 830 of a client-side module 502 of a client device504 or 902). In addition, the user interfaces enabled by the client-sideapplication only require a user to perform essential user interventions(e.g., pushing a button on a new smart device or entering identificationinformation) for commissioning a new smart device on a particularcommunication network using a particular communication network. As such,the commissioning process facilitated by such user interfaces enablesconsistent and smooth user experience in view of the large number ofdevice types and commissioning options that smart devices available onthe market could have.

The GUI display 1200 is associated with a dashboard, and includes aplurality of icons each representing a smart device according to theirlocation. The type of the device is reflected from each icon displayedon the GUI 1200. The user may click on the icon with “+” to add a newsmart device, and the status for adding the smart device is monitored onanother GUI display 1202. Optionally, GUI display 1202 includes anotheraffordance (e.g., circled “ADD DEVICES”), and the user is prompted toclick on this affordance for adding a new smart device.

Further, in some implementations, in accordance with the user interface1204 associated with an inventory of smart devices, a user taps the FINDNEW DEVICES button at the bottom of the user interface 1204 to add a newsmart device.

In some implementations, Revolv connects to three different categoriesof devices, and adding each has its own flow associated with arespective commissioning option of a plurality of commissioning options.Three different categories of devices include premium devices, simpledevices and complex devices. An example user interface 1205 is displayedto the user of the client device, and includes three visual affordances:“PREMIUM,” “SIMPLE,” and “SEARCH.” Optionally, the user interface 1205also includes a notice message to the user, requesting the user toprovide a user action on one of the three visual affordances to startscanning for new smart devices.

Alternatively, in some implementations, after the user selects “FIND NEWDEVICES” on the user interface 1204 or the “ADD DEVICES” affordance onthe user interface 1202, the hub device receives a request for adding anew device. In response to the request, the hub device, automaticallyand without user intervention, starts to search for a new smart deviceand initialize a process for adding a new smart device in accordancewith one of the plurality of commissioning options.

In some implementations, for a first commissioning option associatedwith simple devices, the user of the client device is prompted to tap anaffordance (e.g., “SIMPLE” on a user interface 1206) to discover devicesthat need some sort of interaction to become visible. Then, a userinterface 1208 is displayed to prompt one or more user interventions thecompletion of which is necessary for commissioning of the new smartdevice. The simple devices includes lights and outlets, but you alsoneed to interact with most keypads and motion sensors to make themvisible to our system. Interaction is easy and usually consists ofturning the device on and off, or holding a “set” button somewhere onthe device. The set button is often on the bottom of a device, or hiddenin the battery compartment.

Alternatively, in some implementations, the hub device automaticallydiscovers a new smart device, and determines that that new smart deviceis a simple device that needs to be added into the smart homeenvironment. It is also noted that in some implementations, the hubdevice adds the new smart device into the smart home environmentautomatically and without user intervention after it identifies the newsmart device.

The user interface 1208 or an analogous user interface is displayed toreset a smart home device or activate a new smart home device. In aspecific example, the user interface 1208 is associated with a Z-Waveduplex receptacle or Z-Wave outlet both of which are optionally made byGeneral Electric Company (GE). The user of the client device 902 isprompted to press and release the button in the center of an outlet.Optionally, the user is suggested to skip this intervention of pressingand releasing the button when a new smart device is involved. In anotherspecific example associated with a Z-Wave wall switch made by GE, userinterfaces are displayed to prompt the user connect a light switch or aworking light bulb (switches without a neutral will need to have aworking light bulb connected to be found). The user of the client device902 is prompted to press either end of a main rocker switch. Optionally,the user is suggested to skip this intervention of pressing either endof the main rocker switch when a new smart device is involved.

For a second commissioning option associated with complex devices, oneor more user interfaces (e.g., interfaces 1210, 1212 and 1214) aredisplayed to prompt one or more user interventions the completion ofwhich is necessary for commissioning of many devices on the market thatrequire a more complex setup process. For example, most locks requirethe user to sequentially enter a master code (as shown in the userinterface 1210) and one or more function codes (as shown in the userinterfaces 1212 and 1214). Some thermostats have a specific series ofbutton presses required to make them visible. The user of the clientdevice needs to tap a SEARCH tab and search for a device name of the newsmart device to view device specific instructions right in theclient-side application.

As devices are found, they will pop up in the list at the bottom of thescreen, and are added to the Dashboard user interface 1200 and/or theinventory user interface 1204 automatically. If the user is unable toadd the new device, the user is prompted to check the manufacturer'smanual for additional instructions, and make sure that the new smartdevice functions correctly with any other applications or tools designedto work with it.

The user interface 1216 and 1218 are displayed to request userinterventions for commissioning a complex smart device (e.g., a Z-Wavethermostat). The user interface 1206 prompts the user to press a“system” affordance disposed on the left side of the thermostat. Theuser interface 1218 further requests the user to enter a configurationcode (e.g., by pressing and hold the third and fifth buttons from theleft). In some implementations, a reset user interface is displayed toreset the thermostat if the thermostat has been used previously.Optionally, the user is instructed to skip this intervention of thereset user interface when a new smart device is involved. In someimplementations, a user interface is displayed to prompt the user toenter a single digit or multiple digit code on a keypad of thethermostat, e.g., press down a button on the keypad until “0120” changesto “rF10,” select “0” to remove, press down a button once until “0120”changes to “rF20,” select “1” to add the new smart device, and press“done.” As such, the thermostat is reset or linked with the hub device904. This will allow the user to read the current temperature and stateof the thermostat.

For a third commissioning option associated with Premium Devices, theuser of the client device needs to tap PREMIUM on a user interface 1206to start searching for premium devices. Examples of the premium devicesinclude, but are not limited to, Sonos, Belkin WeMo, and Philips Huedevices. Then, a user interface is displayed to prompt one or more userinterventions (e.g., user inputs of user account credentials associatedwith the new smart device) the completion of which is necessary forcommissioning of the new smart device. In a specific example, NestThermostats and Protect requires the user of the client device to enterhis or her Nest credentials in an affordance of ACCOUNTS accessiblethrough a user interface path (e.g., Menu>Settings>ACCOUNTS).

As explained above, after receiving a user selection of one of theplurality of options, displaying one or more additional user interfacesprompting one or more user interventions, the completion of which isnecessary for commissioning of the new smart device in accordance withthe selected commissioning options. A list of specific example smartdevices and their associated user interventions requested on the one ormore additional user interfaces to reset or add these devices include:

(1). GE—Zwave Duplex Receptacle

-   -   Reset your device (Press and release the button in the center of        the outlet. Skip if this device is new.)    -   Activate your device (Press and release the button in the center        of the outlet.)

(2). GE—Zwave Outlet

-   -   Reset your device (Press and release the button in the center of        the outlet. Skip if this device is new.)    -   Activate your device (Press and release the button in the center        of the outlet.)

(3). GE—Zwave Wall Switch

-   -   Connect your light switch (Switches without a neutral will need        to have a working light bulb connected to be found.)    -   Reset your device (Press either end of the main rocker switch.        Skip if this device is new.)    -   Activate your device (Press either end of the main rocker        switch.)

(4). Honeywell—Zwave Thermostat

-   -   Press “system” on the left side of your thermostat    -   Enter configuration mode (Press and hold the 3rd and 5th buttons        counting from “Done”)    -   Reset your device (The next few steps will walk you through        resetting your device if it's been used previously. If it's new        skip to the add device section.)    -   Press down until “0120” changes to “rF10” (The top of the screen        will read “Select 0 to Remove”.)    -   Select 0 to remove (If your thermostat isn't set up for a        previous network skip this step.)    -   Activate your device (If you didn't reset your device, press        down once until “0120” changes to “rF20”.)    -   Select 1 to add (Your thermostat will be linked with your hub.        We're practically there!)    -   Press done on your thermostat (This will allow us to read the        current temperature and state of your thermostat.)

(5). Insteon—Appliance Linc

-   -   Activate your device (Hold down “set”. The LED will flash        twice.)

(6). Insteon—Lamp Linc

-   -   Activate your device (Hold down “set”. The LED will flash twice        and turn solid, and you'll hear a beep.)

(7). Insteon—Light bulb

-   -   Activate your device (Plug in your light bulb within 30 feet of        your hub. You can move it further away after discovery is        complete.)

(8). Insteon—Motion Sensor

-   -   Open the battery slot (You'll find a small black button inside,        this is the “set” button.)    -   Hold down “set” (This will take about 5 seconds.)    -   Hold down “set” a second time (Wait until the sensor starts        blinking red, about 3 seconds. Once it's blinking red, click        next)    -   Almost there . . . (Once the sensor stops blinking red, you're        done.)

(9). Insteon—Wall Switch

-   -   Activate your device (Easy! Hold down the small clear plastic        button until you hear a beep.)

(10). Kwikset—Zwave Lock

-   -   Remove the top of your Kwikset (It will slide upwards and off)    -   Reset your device (Press and hold the small white button on the        left. Skip if this device is new.)    -   Activate your device (Press and hold the small white button on        the left.)

(11). Leviton—Vizia Appliance Module

-   -   Reset your device (Press and release the button on the outlet.        Skip if this device is new.)    -   Activate your device (Press and release the button on the        outlet.)

(12). Philips—Bridge

-   -   Connect your Philip's Hue Bridge (Make sure your Hue bridge is        plugged into the wireless router that your hub uses, and your        bulbs are joined to it.)    -   Activate your Hue Bridge (Press and release the button in the        center of the bridge

(13). Philips—Additional Bulb(s)

-   -   Connect additional Hue bulbs (Make sure your additional Hue        bulb(s) are currently are plugged in and joined to the bridge.)    -   Activate your bulb(s) (Your new bulbs will be joined to the        hub!)

(14). Sonos—Speaker

-   -   Connect your speaker (Plug your speaker into the wireless router        that your hub uses    -   Set up your playlist from the Sonos application (You'll be able        to play/pause and control volume from Revolv.)

(15) Sonos—Bridge

-   -   Connect your bridge    -   Plug your speaker into the wireless router that your hub uses        (You'll be able to play/pause and control volume from Revolv.)

(16). Trane—Thermostat

-   -   Press “menu” and select “zwave install” (Don't begin the        add/remove process until you tap next.)    -   Reset your device (The next few steps will walk you through        resetting your device if it's been used previously. If it's new        skip to the add device section.)    -   Press “up” to remove your thermostat from its current network        (If your thermostat isn't set up for a previous network skip        this step.)

(17). Activate your device

-   -   Select “zwave install” a second time    -   Press “up” to add your thermostat (Almost there . . . )

(18). Yale—Lock (Buttons)

-   -   Enter your master code and press “#” (Welcome to “Menu Mode”.)    -   Press “7” then “#” (Pop and lock baby.)    -   Press “2” then “#” (This will unlink your lock from any old        networks.)    -   Enter your master code and press “#” (Repetition breeds        success.)    -   Press “7” then “#” (This seems so familiar . . . )    -   Press “1” then “#” (This adds your lock to the Revolv hub!)

(19). Yale—Lock (Touchscreen)

-   -   Enter your master code and press “#” (Welcome to “Menu Mode”.)    -   Press “7” then “#” (Pop and lock baby.)    -   Press “3” then “#” (This will unlink your lock from any old        networks.)    -   Enter your master code and press “#” (Repetition breeds        success.)    -   Press “7” then “#” (This seems so familiar.)    -   Press “1” then “#” (This adds your lock to the Revolv hub!)

When a smart device (e.g., a Nest thermostat) is successfullycommissioned, a user interface 1220 is displayed to indicate that thenew smart device is commissioned. On the other hand, if an error occursand interrupts the commissioning process, a user interface 1222 isdisplayed to request a user input to determine whether to initiateanther commissioning process on the same smart device.

FIG. 13 illustrates example GUIs displayed for controlling sensors basedon geographical information provided by a client device in accordancewith some implementations. The hub device 904 can uses the geographicinformation of the user to control the smart devices smartly. The GUIdisplays 1300 and 1302 prompt the user to enter location information,and confirm the location information by displaying a map marked with thelocation indicated by the location information. Optionally, suchlocation information could be used to monitor whether the user is closedto the smart home environment and calculate sunset/sunrise times forgeo-information dependent sensor control.

FIGS. 14A and 14B illustrate example GUIs displayed for controllingsensors based on a sequence of events in a user's daily life inaccordance with some implementations. The GUI displays 1400-1406 allow auser to manage multiple sensors on a universal hub application accordingto the timeline or events in the user's daily life.

FIGS. 15A and 15B illustrate example GUIs displayed for controllingsensors based on their physical locations in a smart home environment inaccordance with some implementations. The GUI displays 1400-1406 allow auser to manage multiple sensors on a universal hub application accordingto their specific locations at the smart home environment.

It should be understood that the particular order in which theoperations in FIGS. 15A and 15B have been described are merely exampleand are not intended to indicate that the described order is the onlyorder in which the operations could be performed. One of ordinary skillin the art would recognize various ways to implement the same method asdescribed herein. Additionally, it should be noted that details of otherprocesses described herein with respect to method 1500 (e.g., FIG. 15)are also applicable in an analogous manner to method 1200, 1300 and 1400described above with respect to FIGS. 12A-12G, 13 and 14A and 14B,respectively. For brevity, these details are not repeated here.

FIG. 16 is a flow chart for an example method 1600 of adding a smartdevice (e.g., smart devices 204 or 522) to a smart home environment 100in accordance with some implementations of the application. The method1600 is implemented at a client device (e.g., the client device 902)having one or more processors and memory storing one or more programsfor execution by the one or more processors. The client device executes(1602) a client-side application associated with a user account. Theclient-side application is (1604) associated with an electronic devicethat is coupled to the client device over a first communication network.The client-side application displays (1606) a first user interface foradding a new smart device. The first user interface includes a firstaffordance that when selected causes the electronic device to initiate aplurality of commissioning options. In some implementations, the clientdevice sends to the electronic device a user request to search for a newsmart device in the smart home environment. In some situations, theclient device automatically identifies a commissioning option for thenew smart device, and adds the new smart device in the smart homeenvironment without user intervention.

The plurality of commissioning options are defined (1608) according toat least one of a device type of a new smart device, a communicationprotocol associated with a new smart device, and a level of userinteraction involved in a process of adding a smart device. In someimplementations, after receiving a user selection of the firstaffordance, the client device displays (1610) one or more additionaluser interfaces prompting one or more user interventions, the completionof which is necessary for commissioning of the new smart device inaccordance with the selected commissioning options. However, userinterventions are not necessary. In some implementations, afterreceiving a user selection of the first affordance, the client deviceidentifies a new mart device and adds it to the smart home environmentautomatically and without user intervention.

Further, the client device displays (1612) a device-specific controluser interface associated with the new smart device in response toreceiving an indication from the electronic device that the new smartdevice has been added into the smart home environment via communicationbetween the electronic device and the new smart device using one of aplurality of communication protocols. In some implementations, todisplay the device-specific control user interface associated with thenew smart device, the client device obtains device information, anddisplays the device information on the device-specific control userinterface. Optionally, the device information includes at least one of adevice name, a location, and descriptive information of the new smartdevice.

In some implementations, an inventory of the smart home environment isdisplayed on the first user interface, and the first user interfacefurther includes a plurality of second visual affordances eachassociated with a respective smart device that has been installed in thesmart home environment. After commissioning of the new smart device, theclient device displays on the first user interface the plurality ofsecond visual affordances refreshed to include a third visual affordancethat represents the new smart device.

In some implementations, the plurality of commissioning options includesa first commissioning option associated with simple smart devices, Inaccordance with the first commissioning option, the client devicedisplays on the one or more additional user interfaces an instruction tothe user of the client device to instruct the user to press a button onthe new smart device. Further, in some implementations, the instructionis displayed to instruct the user to press one of a power button, a setbutton, and a motion sensor button on the new smart device.

In some implementations, the plurality of commissioning options includesa second commissioning option associated with complex smart devices.After the new smart device is identified, the client device generates asequence of instructions to guide the user to install the new smartdevice according to a manufacturer predetermined commissioningprocedure. The sequence of instructions is optionally displayed on theon the one or more additional user interfaces. The sequence ofinstructions include a first instruction that instructs the user toselect a configuration mode on a keypad of the new smart device, and asecond instruction that instructs the user to enter one or more codes onthe keypad. Alternatively, in some implementations, the new smart deviceis an electronic lock, and the sequence of instructions are configuredto instruct the user to enter a master code on a keypad of the lock.

In some implementations, the plurality of commissioning options includesa third commissioning option associated with premium smart devices. Inaccordance with the third commissioning option, the client devicegenerates a request for user inputs of user account credentialsassociated with the new smart device. Alternatively, in someimplementations, the new smart device is associated with a new smartdevice application that is distinct from the client-side application,and the user account credentials associated with the new smart deviceare used to access a corresponding user account of the new smart deviceapplication.

In some implementations, the client device causes the electronic deviceto establish communication with the new smart device over one or the oneor more second communication networks that are distinct from the firstcommunication network. Specifically, in some implementations, the one ormore second communication networks are implemented based on at least onecommunication protocol of a group consisting of Insteon, IEEE 802.15.4,Wi-Fi, ZigBee, 6LoWPAN, Thread, Z-Wave, Bluetooth Smart, Bluetooth LowEnergy, ISA100.11a, WirelessHART, MiWi, OSIAN, Ethernet, and HomePlug.

In some implementations, the new smart device has been associated withanother user account of the client-side application, or commissioned tocommunicate with another hub device in another smart home environment.

Another aspect of the application is directed to a client deviceincluding one or more processors, and memory storing one or moreprograms for execution by the one or more processors. The one or moreprograms include instructions causing the one or more processors toimplement the method 1600 for adding a new smart device. Further,another aspect of the application includes non-transitorycomputer-readable storage medium storing one or more programs forexecution by one or more processors of a client device. The one or moreprograms include instructions causing the one or more processors toimplement the method 1600 for adding a new smart device. Specifically,for both the client device and the non-transitory computer-readablestorage medium, the one or more programs include at least a client-sideapplication 826 and a device addition module 832 that function togetherto add a new smart device in the smart home environment.

More details on the user interface perspective of the method 1600 foradding a new smart device in a smart home environment are explainedabove with reference to FIGS. 12A-12G.

FIG. 17 is a flow chart for another example method 1700 of adding asmart device (e.g., smart devices 204 or 522) to a smart homeenvironment 100 in accordance with some implementations of theapplication. The method 1700 is implemented at an electronic device(e.g., a hub device 180 or 904, or a smart device having a capability)having one or more processors and memory storing one or more programsfor execution by the one or more processors. The electronic device isconfigured to communicate with a client device (e.g., a client device504 or 902) and a plurality of smart devices through a plurality ofcommunication networks 162. In some implementations, the new smartdevice is one of a camera, a duplex receptacle, a wall switch, a smartlight bulb, a thermostat, a smart power outlet, a motion sensor, anelectronic lock, an appliance module, a hue bridge, an audio device anda security device.

The electronic device receives (1702) from the client device a requestto add a new smart device to the smart home environment 100 over a firstcommunication network of the plurality of communication networks 162.The request is issued (1704) by a client-side application executed bythe client device, and the client-side application is associated with auser account.

In response to the request, the electronic device determines (1708) thata new smart device is available to add to the smart home environmentusing a second communication protocol associated with a secondcommunication network of the plurality of communication networks. Insome implementations, prior to determining the new smart device isavailable, the electronic device scans a subset of the plurality ofcommunication networks for a new smart device in a substantiallysimultaneous manner, and the subset of the plurality of communicationnetworks includes the second communication network.

Further, in response to the request, the electronic device connects(1710) to the new smart device via the second communication network,obtains (1712) device information of the new smart device via the secondcommunication network, and causes (1714) a notification to be providedto a user concerning association of the new smart device with the useraccount and addition of the new smart device to the smart homeenvironment. In some implementations, the electronic device provides thedevice information to a server for the association of the new smartdevice with the user account. In some implementations, the deviceinformation of the new smart device includes one or more of a devicetype, a device identification, one or more device features, devicesettings, and descriptive information of the new smart device.

In some implementations, the second communication protocol associatedwith the second communication network includes one of a group consistingof Insteon, IEEE 802.15.4, Wi-Fi, ZigBee, 6LoWPAN, Thread, Z-Wave,Bluetooth Smart, Bluetooth Low Energy, ISA100.11a, WirelessHART, MiWi,OSIAN, Ethernet, and HomePlug. In some implementations, the secondcommunication network is a short range communication network, anddistinct from the first communication network.

In some implementations, the second communication network is a WiFilocal area network. The electronic device determines that a new smartdevice is available to add to the smart home environment by starting aWiFi device search, scanning for one or more predetermined MAC addressprefixes, and causing a user interface displayed on the client devicefor prompting the user to press a button on the new smart device.Alternatively, in some implementations, In some implementations, theelectronic device determines that a new smart device is available to addto the smart home environment by starting a WiFi device search,broadcasting one or more requests for a discovery protocol (e.g., simpleservice discovery protocol (SSDP)), and receiving a response from thenew smart device. Optionally, the response from the new smart deviceincludes device type information of the new smart device. More detailson a unified pairing process for adding a new smart device based on aWiFi protocol is explained as below with reference to FIG. 18.

In some implementations, the second communication network is based on apoint-to-point communication protocol (e.g., Thread and Bluetooth) or aZ-Wave protocol. The electronic device determines that a new smartdevice is available to add to the smart home environment by at leastcausing display of a user interface on the client device for promptingthe user to press a button on the new smart device. Further, in someimplementations based on the Z-Wave protocol, the electronic deviceobtains the device information of the new smart device via the secondcommunication network by causing another user interface displayed on theclient device for prompting the user to press the button on the newsmart device for a second time. More details on a unified pairingprocess for adding a new smart device based on a Z-Wave protocol isexplained as below with reference to FIGS. 20A-20D.

In some implementations associated with a point-to-point communicationprotocol, the electronic device obtains device information of the newsmart device via the second communication network at least by receivinga pairing request from the new smart device, and determining that thenew smart device is a slave device associated with one or morepoint-to-point protocols. Then, the electronic device responds to thepairing request by sending a pairing confirmation to the slave device.Alternatively, in some implementations associated with a point-to-pointcommunication protocol, the electronic device obtains the deviceinformation of the new smart device via the second communication networkby receiving a group indicator sent by the new smart device; in responseto the group indicator, determining that the new smart device is acontroller device associated with one or more point-to-point protocols,and broadcasting a pairing request; and receiving from the new smartdevice a pairing confirmation in response to the pairing request. Moredetails on a unified pairing process for adding a new smart device basedon a point-to-point protocol is explained as below with reference toFIG. 19.

Another aspect of the application includes an electronic device that isconfigured to communicate with a client device and a plurality of smartdevices through a plurality of communication networks. The electronicdevice includes one or more processors, and memory storing one or moreprograms for execution by the one or more processors, and the one ormore programs include instructions causing the one or more processors toimplement the method 1700 for adding a new smart device.

Further, another aspect of the application includes non-transitorycomputer-readable storage medium storing one or more programs forexecution by one or more processors of an electronic device. The one ormore programs include instructions causing the one or more processors toimplement the method 1700 for adding a new smart device. Specifically,for both the electronic device and the non-transitory computer-readablestorage medium, the one or more programs include a device additioninterface module 6244 and a device addition module 622 that functiontogether to add a new smart device in the smart home environment.

It should be understood that the particular order in which theoperations in FIGS. 16 and 17 have been described are merely example andare not intended to indicate that the described order is the only orderin which the operations could be performed. One of ordinary skill in theart would recognize various ways to implement the respective smartdevice adding method as described herein. Additionally, it should benoted that details of other processes described herein with respect tomethod 1600 (e.g., FIG. 16) or method 1700 (e.g., FIG. 17) are alsoapplicable in an analogous manner to the other methods discussed in thisapplication. For brevity, these details are not repeated here.

FIG. 18 is a flow chart for an example method 1800 of adding a smartdevice that communicates based on a WiFi protocol in accordance withsome implementations of the application. In some implementations, aclient-side application 826 is executed at a client device 902 inassociation with a user account. The client-side application 826 isassociated with an electronic device (e.g., a hub device 904 or anexisting smart device) that is coupled to the client device 902 over afirst communication network, and the electronic device is coupled to oneor more smart devices over one or more second communication networks(e.g., a WiFi network). The client-side application enables a display ofa user interface for adding a new smart device, and receives (1802) onthe user interface user instructions of adding a new smart deviceaccording to one of a plurality of commissioning options. Specially, inaccordance with the method 1800 of adding the new smart device, theselected commissioning option is defined to support a commissioningprocess that are compatible with one or more communication protocolsincluding a WiFi protocol, such that a new smart device that cancommunicate based on the WiFi network would be successfully commissionedaccording to the selected commissioning option. Here, after a hub devicereceives from the client device 902 the user instructions of adding anew smart device according to the selected commissioning option, itstarts (1804) a search for a new WiFi-based smart device. Alternatively,in some implementations, the hub device initializes (1806) a search fora new WiFi-based smart device periodically.

In some implementations, the hub device scans (1808) for predeterminedMAC address prefixes. When a predetermined MAC address prefix isidentified in association with a new smart device, the hub device polls(1810) the identified smart device with a join request that requests toadd the new smart device into a smart home environment associated withthe hub device. On the client-side application, the user makes the jointrequest, and the join request optionally includes a request for a userintervention (e.g., pressing a button on the new smart device). When theuser intervention occurs (1812) and the new smart device accepts (1814)the join request, the new smart device is added (1816) to the smart homeenvironment.

In some implementations, the hub device broadcasts (1818) requests for asimple service discovery protocol (SSDP) or other discovery protocols.In response to receiving the request, the new smart device responds(1820) with information concerning its device type. The hub devicedetermines (1822) that the device type is known and automatically joins(1816) the new smart device in the smart home environment.

FIG. 19 is a flow chart for an example method 1900 of adding a smartdevice that communicates based on a point-to-point protocol inaccordance with some implementations of the application. In accordancewith the method 1900 of adding the new smart device, the commissioningoption selected on the client-side application 826 of the client device504 or 902 is defined to support a commissioning process that arecompatible with one or more communication protocols including apoint-to-point protocol, such that a new smart device that cancommunicate based on a point-to-point protocol would be successfullycommissioned according to the selected commissioning option. After thehub device 904 receives (1902) from the client device 902 the userinstructions of adding a new smart device according to the selectedcommissioning option, it starts (1904) a joining mode associated with apoint-to-point protocol. In accordance with the joining mode, a user isinstructed (1906) to provide a user intervention (e.g., pressing abutton on a new smart device that needs to be added).

In some implementations, the point-to-point protocol (e.g., Insteon) isassociated with a distinction between devices which can be controlled(slave, like a light bulb or thermostat) and those that are controllers(such as a keypad or a switch). When used in a point-to-point mode, onewould pair a particular button on a controller with a particular deviceor devices to be controlled through a complex and error prone pairingprocess. Thus, there are two sides to the process, so a Hub that istrying to connect to both has to go through the opposite half of thejoining process for each. Normally this would require a different userprocess for each (for example on an 8 button keypad pairing each of the8 buttons individually to the hub), but we were able to create anidentical user experience with our two different backendimplementations. For these cases, the client device includes a mobileapplication with which the user interacts, communicating through aservice to the Hub. The server is mostly irrelevant for thisapplication.

In some implementations, the new smart device is a slave device of thehub device, and has to send (1908) a pairing request to the hub device.In response to receiving the pairing request, the hub device determineswhether to send a pairing confirmation to the new smart device and allowit to be added into the smart home environment associated with the hubdevice. When the hub device (e.g., the hub device 904) responds (1910)with the pairing confirmation, the new smart device is successfullycommissioned and added (1912) into the smart home environment associatedwith the hub device.

In some implementations, the new smart device is a controller devicethat sends (1914) a group indicator. In response to the group indicator,the hub device sets up a group broadcast, and sends (1916) to the newsmart device a pairing request. In response to receiving the pairingrequest, the new smart device (i.e., the controller device) determineswhether to send a pairing confirmation to the hub device. When the newsmart device responds (1918) with the pairing confirmation to the hubdevice, the new smart device is successfully commissioned and added(1912) into the smart home environment associated with the hub device.

FIGS. 20A-20D is a flow chart for a method 2000 of adding a smart devicethat communicates based on a Z-Wave protocol in accordance with someimplementations of the application. Z-Wave is a wireless home automationprotocol that runs on a 908.42 MHz frequency band. One of the keyfeatures of Z-Wave is that it utilizes a mesh network, and statedanother way, a Z-Wave smart device passes signals along to another smartdevice or a hub device 904 until it reaches its intended destination.

A client device 902 receives (2002) on a user interface userinstructions of adding a new smart device according to one of aplurality of commissioning options. Specially, in accordance with themethod 2000 of adding the new smart device, the selected commissioningoption is defined to support a commissioning process that are compatiblewith one or more communication protocols including a Z-Wave protocol,such that a new smart device that can communicate based on the Z-Wavenetwork would be successfully commissioned according to the selectedcommissioning option. A hub device (e.g., a Revolv hub) receives (2004)from the client device 902 the user instructions of adding a new smartdevice according to the selected commissioning option, and enters a“discovery” mode. In accordance with the discovery mode, the hub deviceconfigures (2006) a Z-Wave radio associated with the hub device to alearnReady mode, such that the hub device is ready to commission aZ-Wave based smart device.

Further, the client device displays one or more additional userinterfaces prompting one or more user interventions, includingdisplaying (2008) an instruction to push a button on the new smartdevice. In some implementations, after the user pushes (2010) thebutton, the new smart device enters (2012) a learn mode. In accordancewith the learn mode, the new smart device acknowledges (2014) to the hubdevice of its existence via the Z-wave radio associated with the hubdevice, and determines (2016) whether it is already part of a Z-Wavenetwork. After determining whether the smart device is part of a Z-Wavenetwork, the smart device communicates the determination result to thehub device, such that the hub device is configured (2018) accordingly(e.g., resetting its communication with the new smart device) to getprepared for commissioning the new smart device. The hub device sends anotification concerning its status to the client device.

Then, the client device displays (2020) to push a button on the newsmart device, and after the user pushes (2022) the button for a secondtime, the new smart device re-enters (2024) a learn mode to join a newnetwork (e.g., a new Z-Wave network). During the course of commissioningthe new smart device, a plurality of parameters are configured (2025)for both the hub device and the new smart device. The plurality ofparameters includes, but is not limited to, routes, security and devicesettings. In some implementations, the hub device determines andnotifies (2026) the client device that the new smart device is anexisting device. The client device displays (2028) a notificationindicating that an existing device is reconnected. Alternatively, insome implementations, the hub device determines and notifies (2030) theclient device that the new smart device is a new smart device. The hubdevice is configured to register (2032) the new smart device, and thenew smart device is therefore added into the smart home environmentassociated with the hub device.

Further, in some implementations, a user controls (2034) the client-sideapplication to exit the user interface for adding a new smart device(e.g., the user interface 1205). The hub device receives a command fromthe client device, and accordingly, exits (2036) the discovery mode. Thehub device also controls (2038) its Z-Wave radio to exit a correspondingmode, and synchronizes a device list with the Z-Wave radio. The smartdevices that are removed from the Z-Wave network are deleted (2040) fromthe device list, and the client device updates (2042) its device listaccordingly.

Although various drawings illustrate a number of logical stages in aparticular order, stages that are not order dependent may be reorderedand other stages may be combined or broken out. While some reordering orother groupings are specifically mentioned, others will be obvious tothose of ordinary skill in the art, so the ordering and groupingspresented herein are not an exhaustive list of alternatives. Moreover,it should be recognized that the stages could be implemented inhardware, firmware, software or any combination thereof.

The foregoing description, for purpose of explanation, has beendescribed with reference to specific implementations. However, theillustrative discussions above are not intended to be exhaustive or tolimit the scope of the claims to the precise forms disclosed. Manymodifications and variations are possible in view of the aboveteachings. The implementations were chosen in order to best explain theprinciples underlying the claims and their practical applications, tothereby enable others skilled in the art to best use the implementationswith various modifications as are suited to the particular usescontemplated.

In the description of this application, “sensor” and “smart device” areused in an exchangeable manner in some places.

Revolv Home Automation System

A. Overview

Revolv Home Automation System is a set of hardware and software thatallows for secure local and remote control of home automation devices. Atypical setup comprises a Gateway that resides within the LAN of auser's home to communicate with various HA Devices, Revolv's Cloudservices which enable remote access, and mobile Apps and other Clientswhich allow users to interact with the system. These components interactwith each other using Apache Thrift, an IDL and binary protocol whichensures correct-by-design communications. This document describes thesystem and the Thrift protocol needed to set up and control the Revolvsystem.

B. Terminology

-   -   App—A single client endpoint, usually a single phone/tablet    -   Cloud—The Revolv backend, comprising Sugarmill and PubNub    -   Sugarmill—The Revolv backend, used for authentication and backup    -   PubNub—Third-party service used for real-time communication with        the gateway    -   Gateway—the Revolv hardware that controls Devices from within        the home    -   Rule—a.k.a Actions, triggers and conditionals that cause        automated control    -   Scene—A collection of device states that can be applied by the        Gateway    -   Device—A home automated device attached to the Gateway, not to        be confused with a mobile phone/tablet    -   Feature—A set of states and functionality that can be        implemented on a Device    -   Thrift—Revolv's interface description, specified in Apache        Thrift

C. Architecture

FIG. 5B illustrates the overall architecture of an example Revolv HomeAutomation System.

1. Gateway

The Gateway is Revolv's hardware which is typically joined to a user'sWiFi router within their home. It communicates with the Devices withinthe user's home directly via various radio protocols, and through theLAN to IP-based devices. The Gateway is the main command and controlcenter of the System, including command queuing, scenes, and the rulesengine for automating devices.

2. Cloud

The Cloud facilitates communications and persistence between Clients andthe Gateway, and comprises Revolv's RESTful service called Sugarmill,and a third-party Pub-Sub service called PubNub. Sugarmill providescomponent authentication, authorization, and persistence of allrelational data that can be accessed regardless of the online state ofthe various components. For example, a Client can access the Gateways itis connected to, Devices on each Gateway, and access and modify Rulescontrolling those devices even if the Gateway itself is disconnected.Sugarmill uses standard HTTPS endpoints with POST, PUT, and DELETEmethods.

Beyond the standard endpoints used for normal user operation, Sugarmillprovides a set of admin endpoints used for management of multiplesystems. This is used by Revolv customer support, but certain of thesecan be exposed as needed via developer key.

All real-time command and control is done over PubNub, a third-partysolution which provides secure, reliable real-time message passing withminimal latency over the internet. This allows normal remote Revolvcommunication to operate in an efficient asynchronous manner, whilekeeping all system components up to date with the current state. It alsooptimizes battery and data usage on mobile devices. Revolv also offers amore direct socket mode which can be used for even faster communicationswhen a Client is operating locally within the same LAN as the Gateway.

3. SDKs

On the Client side, Revolv offers an iOS and an Android app designed foruser-friendly operation of the Revolv system. Each of these is built ontop of a platform specific SDK, which Revolv will provide to thirdparties for building their own clients. The Android SDK is built on topof a Java SDK, which allows command and control of Revolv from any JVMbased platform. The SDK's generally manage all of the communicationsbetween the Client, Cloud, and Gateway, providing the developer with asimple live data model to operate upon.

D. Thrift

All interfaces and data objects used in the system are described by anApache Thrift definition. These compile to language specific bindingsthat are available for most commonly used languages, and provide acompact and correct-by-design protocol for the Revolv system. While theSDKs hide much of the detail around building and manipulating Thriftobjects for most Client's needs, it is necessary to understand theThrift when building administrative applications that fall outside ofthe normal end-user use cases.

Revolv's Thrift definition is split into files by functional unit, withdata model, real-time (PubNub), and Sugarmill request interfacesrequired for a given unit maintained in one file. A maven build file isincluded in the source repository, which first combines these into asingle Thrift file with all dependency ordering handled, then buildlanguage bindings for Java, Objective C, Python, Go, and JavaScript.Thrift also supports many other language bindings.

A Thrift definition comprises structs, unions, and enums, and also hassets, lists, and maps for collection objects. In most fields areoptional, so it is easy to pass partial values for an object and havethe recipient detect empty fields.

E. Object Model

This section outlines the components of the Revolv data model.

1. App

Every Client is represented by an App in Sugarmill. An App can associatewith one or more Gateways, although currently only one is exposed in theRevolv application. Apps are associated to a Gateway through either theFlashLink commissioning process, or through an invite code.

struct RvtApp { 1: RvtUuid appId 2: RvtSerialNumber serialNumber 3:set<RvtGateway> gateways 4: string appName 5: string appMakeModel 6:RvtVersion appVersion 7: set<RvtAppGatewaySettings> appGatewaySettings8: list<RvtDashboard> dashboards }

2. Gateway

A Gateway represents a single Revolv hardware Gateway. It is broughtonline through the FlashLink commissioning process, at which point it isalso associated with an App.

struct RvtGateway {  1: RvtUuid gatewayId  2: RvtSerialNumberserialNumber  3: RvtName name  4: set<RvtDevice> devices  5: stringfirmwareVersion  6: RvtGatewaySettings settings // Only returned inQuery requests  7: i32 deviceCount  8: list<RvtUuid> appIds // Thegateway's status.  9: RvtGatewayStatus gatewayStatus // Accountsassociated with this gateway 10: set<RvtExternalAccount> accounts 11:RytTimestamp update Started // APPROXIMATE 12: i32 groupId // Used foradmin groups 13: RytTimestamp lastHeartbeat 14: stringdesiredFirmwareVersion 15: bool forceUpdate }

3. Device

A Device represents a single physical controllable piece of homeautomation hardware, such as a switch or a lock. Devices are tied to asingle Gateway. Devices have a deviceType field, which describes at ahigh level what the Device is, and a set of Features that describe thecapabilities of the device. For example, two Devices may have OnOff andLevel features, but one could have a deviceType of LIGHT (i.e. alightbulb) and the other SWITCH (i.e. a wall dimmer). The Device id isthe identifier used for accessing and controlling the Device.

struct RvtDevice {  1: RvtUuid id  2: RvtName name  3: RvtSerialNumberserialNumber  4: RvtManufacturer manufacturer  5: RvtDeviceTypedeviceType  6: RvtF eatures features  7: RvtDiscoveryStatediscoveryState  8: RvtProtocol protocol  9: RvtDeviceStatus deviceStatus10: string metadata 11: RvtAuthenticationState authenticationState 12:RvtUuid accountId 13: RvtAssociationOptions options } enum RvtDeviceType{ UNKNOWN = 1 OUTLET = 2 SWITCH = 3 LIGHT = 4 KEYPAD = 5 MOTION_SENSOR =6 WATER_SENSOR = 7 THERMOSTAT =  8 DOOR_LOCK =  9 MUSIC_PLAYER = 10CAMERA = 11 MULTILIGHT = 12 ACCOUNT = 13 LIGHT_STRIP = 14 SHADES = 15GARAGE_DOOR = 16 OPEN_SENSOR = 17 BRIDGE = 18 FIREPLACE = 19 FAN = 20FANLIGHT = 21 ALARM = 22 SAFETY_SENSOR = 23 }

4. Feature

Devices contain one or more Features which describe variousfunctionalities offered by the Device. For example, a media player mighthave a MediaPlayer Feature for controlling the current media and playmode, and a separate Volume Feature for setting the volume, fades, etc.

The Features object in Thrift is used in several ways, from indicatingthe existence of particular Features on a Device, to conveying currentstate of the Device, to sending commands and state changes to beexecuted on the Device. This is accomplished through a mix of fields,one or more which are available on every Feature:

-   -   States—state variables of the Feature that can be read or        written, for example the Level Feature has a level state        variable that is a double. Most state variables that are        continuous values have a normalized range of 0.0 to 1.0; the        exception being where it has a standard unit such as        temperature. Some state variables are read only, they have a        “ro” prefix on their name.    -   Command—commands that can be run on the Device. Every Feature        that contains writable state has at minimum a “setState”        command, which when requested sets the values in “states”. Other        commands allow for causing behavior that can't be expressed by        setting state, for example nextTrack or setChannel on a media        player.    -   Details—for (relatively) static information about a device, such        as the layout of a keypad or the max keycodes that can be stored        on a lock. Unlike state and commands which are only communicated        in real time over PubNub, details are stored on the Cloud and        get retrieve when Devices are retrieved from Sugarmill.

Here is the Level feature, used for dimmers. It has a state of level,some commands to allow continuous adjustment of the level, and nodetails:

struct RvtLevelStates { 1: RvtLevel level } // Command for adjusting avalue in a continuous manner, call StopAdjust when done structRvtStartAdjustCommand { 1: bool up // If specified, how long the devicewould take to adjust through its full range 2: RvtMillisecondstimeToFull } // Stop adjusting a value in a continuous manner structRvtStopAdjustCommand { } union RvtLevelCommands { 1: RvtSetStateCommandsetState 2: RvtStartAdjustCommand startAdjustLevel 3:RvtStopAdjustCommand stopAdjustLevel } struct RvtLevelFeature { 1:RvtLevelStates states 2: RvtLevelCommands command }

The TemperatureControl Feature, used for setting temperature goals onthermostats, has some writable state variables, one read-only state, anddetails describing the supported modes of a particular thermostat:

enum RytTemperatureControlMode { OFF = 1 HEAT = 2 COOL = 3 AUTO = 4 }enum RytTemperatureControlFan { AUTO = 1 ON = 2 TIMER = 3 } structRytTemperatureControlDetails { 1: set<RvtTemperatureControlMode>supportedModes 2: set<RvtTemperatureControlFan> supportedFanModes }struct RytTemperatureControlStates { 1: RytTemperature goal // To bedeprecated in favor of heat/coolGoal 2: RytTemperatureControlMode mode3: RytTemperatureControlFan fan 4: RytTemperature heatGoal 5:RytTemperature coolGoal 6: RytTimestamp roFanTimerExpiration // Nestfan_timer_timeout } // Thermostats have no ON mode; this command changesthe mode from OFF to the // previously-seen non-OFF mode structRvtSetModeOnCommand { } union RytTemperatureControlCommands { 1:RvtSetStateCommand setState 2: RvtSetModeOnCommand setModeOn } structRytTemperatureControlFeature { 1: RytTemperatureControlStates states 2:RytTemperatureControlCommands command 3: RytTemperatureControlDetailsdetails }

Individual Features are combined into an overall RvtFeatures Thriftstructure:

struct RvtFeatures {  1: RvtOnOffFeature onOff  2: RvtLevelFeature level 3: RvtLockFeature lock  4: RvtTemperatureSensorFeature temperatureSensor  5: RytTemperatureControlFeature temperatureControl  6:RvtMotionSensorFeature motionSensor  7: RvtWaterSensorFeaturewaterSensor  8: RvtColorFeature color  9: RvtImageFeature image 10:RvtVolumeFeature volume 11: RvtMediaPlayerFeature mediaPlayer 12:RvtContentDirectoryFeature contentDirectory 13: RvtButtonPadFeaturebuttonPad 14: RvtGroupFeature group 15: RvtOpenableFeature openable 16:RvtOpenSensorFeature openSensor 17: RvtBatteryLevelFeature batteryLevel18: RvtUserCodeFeature userCode 19: RvtBridgeFeature deviceBridge 20:RvtPositionFeature position 21: RvtCOSensorFeature coSensor 22:RvtSmokeSensorFeature smoke Sensor 23: RvtAlarmModeFeature alarm 24:RvtEnergySavingFeature energySaving 25: RvtAwayFeature away 26:RvtActiveFeature active 27: RvtDiscreteFeature discrete }

5. Scene

A Scene describes a set of states and behaviors for various device to beset. For example, lock the doors, turn down the lights, and put on somejazz. A scene can be activated via a Gateway command, or can be includedin a Rule as the action to take.

struct RvtSceneItem { 1: RvtCommandDevices command 2: bool enabled }struct RvtScene { 1: RvtUuid id 2: string name 3: RvtDiscoveryStatediscoveryState 4: list<RvtSceneItem> commands 5: list<RvtBehavior>behaviors // more complicated series of things to do. }

6. Rule

A Rule combines a Scene with a trigger and conditions which cause thescene to activate automatically. A trigger is an event, such as a timeof day, a change in a device, or change in occupancy, while conditionsare checks on current status that can additionally be met.

union RvtTrigger {  1: RvtNotification notificationTrigger  2: RvtEventeventTrigger  3: RvtTime Schedule timeSchedule  4: RvtEnvironmentenvironment  5: RytTriggerOperator operator // RPN operators } structRvtRule {  1: RvtUuid ruleId  2: RvtUuid gatewayId  3: string name  4:RytTrigger trigger  6: bool active // Send a push notification if thisis set  9: list<RvtPushRecipient> pushRecipients 10: RvtUuid sceneId 11:list<RvtTrigger> conditions // RPN list of conditions }

F. Sugarmill

Sugarmill is a RESTful service that persists the overall relationalstate of the system—which Apps are connected to which Gateways, and theDevices, Rules, and other operating parameters of a given Gateway. Themain exception is that the real-time state of Devices (i.e. is thislight on) is not persisted in Sugarmill. It also manages authorizationand connecting Gateways to Apps during commissioning.

1. Identity

Revolv maintains several installations of Sugarmill besides theproduction version, for development and staging purposes. The App andthe Gateway can both be talking with the same installation of Sugarmillin order to communicate properly. Revolv dynamically assigns Gateways toparticular installation endpoints using the Identity service. Todetermine the endpoint assigned to a particular Gateway, call theIdentity service with the serial number of the Gateway (its MAC address,printed on the bottom):

https://identity.revolv.com/v1/gateway/endpoint { ″serialNumber″:″B0:79:3C:00:12:34″ } Response: { ″name″: 1, ″un″:″https://api-v2.revolv.com″ }

The endpoint returned will be one of:

-   -   Production—https://api-v2.revolv.com    -   Beta—https://sugarmill-beta.revolv.com    -   Stage—https://sugarmill-stage.revolv.com

2. Request Format

While the examples in this document use JSON for readability, the properway to communicate with Sugarmill is using the Revolv's Thrift interfacedefinition, serialized using Thrift's “TBinaryProtocol” protocol.Sugarmill accepts and returns three different serializations moderatedby “Content-Type” and “Accept” headers, but due to limitations in ThriftJSON parsing, only very simple requests will work with the“application/x-json” content type:

-   -   application/x-thrift—preferred, thrift's standard binary        protocol    -   application/json—ok, thrift's unreadable json version of its        binary protocol    -   application/x-json—unreliable, readable json as shown in this        documentation

Here is an example of how to generate a thrift binary request to set thename of a Device in Java. Different language bindings for Thriftaccomplish this in different ways, but the principle is the same. First,the thrift for the request:

// Update an existing device. // PUT/gateway/{gatewayId}/device/{deviceId} struct RvtUpdateDeviceRequest {1: RvtApiRequestData requestData 2: RvtDevice device } structRvtUpdateDeviceResponse { 1: RvtDevice device } struct RvtDevice { 1:RvtUuid id 2: RvtName name ... } The pretty JSON for this request wouldlook like: PUT https://api-v2.revolv.com/gateway/my-gateway-id/device/my-device-id { ″requestData″: {″id″: ″my-app-id″, ″apikey″:″key″}, ″device″: { ″name″: ″Some name″ } }

The Java code for this would be:

import com.revolv.thrift.* RvtApiRequestData reqData = newRvtApiRequestData( ); reqData.setId(“my-app-id”);reqData.setApikey(“key”); RvtDevice devData = new RvtDevice( );devData.setName(“Some name”); RvtUpdateDeviceRequest request = newRvtUpdateDeviceRequest( ); request.setRequestData(reqData);request.setDevice(devData); TProtocolFactory protocolFactory = newTBinaryProtocol.Factory( ); byte[ ] requestBytes = (newTSerializer(protocolFactory)).serialize(request);

Then requestBytes would be sent as the body of the request, withapplication/x-thrift as the Content-Type. A similar TDeserializer willunmarshall the response back into the RvtUpdateDeviceResponse thriftobject. Note that the protocolFactory can be a singleton, but theTSerializer is not thread-safe and should be created for everyserialization.

3. Security

Every request may be accompanied by an RvtApiRequestData, which containsan identity and an access token for that identity. In normal operationthese are generated during Gateway/App pairing, authorizing an App id toaccess a particular Gateway id. For administrative purposes, an id/tokenpair will be provided by Revolv, which gives access to the Gatewaysunder your purview. Tiered administrative access for third parties iscurrently under development.

4. Making Requests

All requests are documented in the Revolv Thrift definition, with theendpoint path and the request and response body. Due to limitations onGET in various http libraries, only the POST, PUT and DELETE methods areused in Sugarmill calls. Get is accomplished with a POST request on the. . . /type/id endpoint, while adding a new object would use a . . ./addType POST request.

The following is the set of request/response bodies for Devices:

// Add a new device // POST /gateway/{gatewayId}/addDevice structRvtNewDeviceRequest { 1: RvtApiRequestData requestData 2: RvtDevicedevice 3: RvtUuid gatewayId } struct RvtNewDeviceResponse {1:RvtUuiddeviceId } // Retrieve a single device // POST/gateway/{gatewayId}/device/{deviceId} struct RvtGetDeviceRequest { 1:RvtApiRequestData requestData 2: RvtUuid deviceId 3: RvtUuid gatewayId }struct RvtGetDeviceResponse {1: RvtDevice device } // Update an existingdevice. // PUT /gateway/{gatewayId}/device/{deviceId} structRvtUpdateDeviceRequest { 1: RvtApiRequestData requestData 2: RvtDevicedevice } struct RvtUpdateDeviceResponse {1: RvtDevice device } // Updatemultiple devices in a single call. I-F the device ID is set, // update.Otherwise, add it. // PUT /gateway/{gatewayId}/devices structRvtUpdateDevicesRequest { 1: RvtApiRequestData requestData 2:list<RvtDevice> devices } struct RvtUpdateDevicesResponse { // Success-Flags, in the same order as the provided list. 1: list<RvtUuid>deviceIds } // Retrieve multiple devices. I-F the set o-F device IDs isempty, return // all devices -For this gateway. // POST/gateway/{gatewayId}/devices struct RvtGetDevicesRequest { 1:RvtApiRequestData requestData 2: set<RvtUuid> devices } structRvtGetDevicesResponse { 1: set<RvtDevice> devices } // Delete a device// DELETE /gateway/{gatewayId}/device/{deviceId} structRvtDeleteDeviceRequest { 1: RvtApiRequestData requestData 2: RvtUuiddeviceId } struct RvtDeleteDeviceResponse { 1: bool deleted }

G. PubNub

PubNub is a third-party service that provides fast efficient messagingusing publish/subscribe based channels. Revolv uses PubNub forasynchronous communications between the App and the Gateway, and also toreceive asynchronous notifications from the Cloud. The Java and iOS SDKsmanage all of the actual client-side interactions with PubNub and exposethem in their respective data models, so the following is mainly forreference and debugging.

1. Channels

Channels are PubNub's message pipelines, which can be independentlypublished and subscribed to by multiple clients. These channels useseveral levels of security, and are authenticated for access bySugarmill. In the Revolv system, each Gateway creates three channels forcommunications:

-   -   Notify—subscribed to by both Gateway and Apps    -   App→GW—for Apps to send messages to the Gateway, which is the        only subscriber    -   GW→App—for Gateways to send to all Apps, subscribed by all Apps

Gateways and Apps receive their channel list usingRvtGatewayChannelsRequest and RvtAppChannelsRequest calls to Sugarmill,respectively. These also contain the keys and origin needed to publishand subscribe to Revolv's channel sets. See PubNub documentation formore details on how to subscribe and publish to these channels.

2. Message Format

PubNub requires short, JSON/ASCII messages, while Revolv requiresvariable length messages using Thrift. The pubnub.thrift file describesthe messages used, as shown here:

struct RvtMessageHeader { 1: RvtUuid senderId 2: RvtMessageId messageId3: RvtTimestamp timestamp 4: i32 packetNumber 5: i32 totalPackets }struct RvtMessage { 1: RvtMessageHeader header 2: RvtMessageContentscontents } struct RvtMessageJson { 1: string header 2: string contents3: string contentPart }

RvtMessage describes a message, which comprises a header and contents.However the actual message sent over PubNub is RvtMessageJson, in simplereadable JSON format. The header and contents are the binaryRvtMessageHeader and RvtMessageContents, base64 encoded to ASCIIstrings. When a message is too large for PubNub (>1400 bytes), thebase64 contents string is broken up and sent in multiple messages, withthe current and total packet count placed in each header, and the packetcontents placed in contentPart.

The header contains other metadata for the message. Senderld is the UUIDof the App or Gateway (and occasionally Cloud) which sent the message,useful for ignoring messages on the Notify channel that were self-sent.MessageId is a unique id generated by the sender of the message, usedboth for identifying parts of a multi-packet message, and for synchingresponses to requests. As described below in Control Traffic, allfollow-on response messages to a request message use the same messageId.

Here is an example message as posted to PubNub, with base-64 encodedheader and message:

{

“header”: “ADD142JB . . . ”,

“contents”: “DJ43BBnAjd0 . . . ”

}

3. Control Traffic

The contents of the message are contained in RvtMessageContents:

struct RvtMessageContents { 1: RvtCommandGateway commandGateway 2:RvtCommandDevices commandDevices 3: list<RvtEvent> events 4:RvtNotification notification } This allows for three types of message: 1commandGateway − gateway-wide commands, such as start discovery mode 1commandDevices + events − device control and monitoring 1 notification −global notification of changes

1) Gateway Commands

Gateway commands affect or retrieve information about global gatewayoperation, that are sent from the App to the Gateway on the App→GWchannel. They often cause a response message to be broadcast to theGW→App channel:

union RvtCommandGateway {  1: RvtGetStateCommand getState  2:RvIStartDiscoveryCommand startDiscovery  3: RvtStopDiscoveryCommandstopDiscovery  4: RvtFactoryResetCommand factoryReset  5:RvIStartUnjoinCommand startUnjoin  6: RvtManufacturerLoginCommandmanufacturerLogin  7: RvtGetMediaChannelsCommand getMediaChannels  8:RvtGetOccupancyCommand getOccupancy  9: RvtSetCurrentSceneCommandsetCurrentScene 10: RvtGetCurrentSceneCommand getCurrentScene 11:RvtProtocolCommand protocolCommand 12: RvtCaptureSceneCommandcaptureCurrentScene 13: RvtGetAssociationSchemesCommandgetAssociationSchemes 14: RvtGetGatewayStatusCommand getGatewayStatus }

Some key commands are:

-   -   GetState—returns the current operating state of all (or a        specified list of) Devices. Since this is not maintained on        Sugarmill, this is how to retrieve whether lights are on, etc.        This will cause a message to be returned with the events field        set, which will include all Device state.    -   Start/stopDiscovery—Many protocols have a discovery mode for        finding new devices, this starts and stops this mode on the        Gateway across protocols. If a stop is not explicitly sent, the        Gateway will timeout after 2 minutes. A        RvtGatewayStatusChangeNotification will be sent with DISCOVERY        set when the Gateway is in discovery mode, and back to OK when        the discovery mode ends.    -   Get/set/capture scene—The current Scene showing can be        manipulated, and new Scenes captured with these commands.

2) Device Control

The commandDevices and events fields are used in concert to requestDevice changes and monitor the results. A commandDevices can contain oneor more Devices, and set states and commands within the various Featuresof the Devices. A state is a discreet read-write value on a Feature of aDevice. For example, a dimmable light switch will have a Feature called“Level”, which has a state called “level” which is a value between 0.0and 1.0 of the brightness of the light. A command is requesting theDevice do something other than set a simple state value, for examplegoing to the next track on a media player.

The commandDevices, status, and events structures are:

struct RvtCommandDevices { 1: set<RvtUuid> deviceIds 2: RvtFeaturescommands 9: RvtPushData pushSuccessMessage 10: RvtPushDatapushFailMessage } struct RvtStatus { 1: RvtStatusCodes code 3:RvtLiveTime timeToComplete 4: RvtLevel percentToComplete // 0.0 - 1.0 5:RvtStringMsg messageStr } struct RvtEvent { 1: set<RvtUuid> deviceIds 2:RvtStatus status 3: RvtFeatures events }

RvtFeatures, as described in the Object Model section, is used both tosend commands and state changes to Devices, and to return state events.

The following is a Device command sent from an app to start a mediaplayer playing at a volume of 30%:

{ “header”: { “senderId”: “my-app-id”, “messageId”: “my-app-id:1234” },“contents”: } “commandDevices”: } “deviceIds”: [“mediaplayerId”],“commands”: } “volume”: } “state”: } “volume”: 0.3, “mute”: false },“command”: } “setState”: { } }, “mediaPlayer”: { “command”: { “play”: {“speed”: 1.0 } } } } } } }

This command is affecting 2 Features of the Device, the Volume and theMediaPlayer. For the Volume Feature, the command is to setState, and thevalues of state to set are volume to 0.3 and mute to off. For theMediaPlayer Feature, the command is to play, and we are passing aparameter to play at full speed.

Once this command is passed to the Gateway via the App→GW channel, theGateway will verify that the command is valid and pass back a messageover the GW→App channel indicating that it will be executed:

{ “header”: { “senderId”: “my-gateway-id”, “messageId”: “my-app-id:1234”}, “contents”: { “commandDevices”: { “deviceIds”: [“mediaplayerId”],“commands”: { “volume”: { “state”: {“volume”: 0.3, “mute”: false},“command”: {“setState”: { }} }, “mediaPlayer”: { “command”: {“play”:{“speed”: 1.0}} } } }, “events”: [{ “deviceIds”: [“mediaplayerId”],“status”: { “code”: 202, “message”: “DeviceCommand Received” } }] } }

Note that this contains the same messageId as the request message,although now has the senderId of the Gateway. It also contains a copy ofthe command requested to be executed, and events filled out with just astatus indicating that the command for the media player was received andwill be executed. This allows Apps other than the one which sent therequest to update their UI to indicate Device operation is in progress.Invalid values could have returned a failure message.

When the command succeeds or fails, a final message is sent, also withthe same messageId, with the final status and state of the Devices:

{ “header”: { “senderId”: “my-gateway-id”, “messageId”: “my-app-id:1234”}, “contents”: { “commandDevices”: { “deviceIds”: [“mediaplayerId”],“commands”: { “volume”: { “state”: {“volume”: 0.3, “mute”: false},“command”: {“setState”: { }} }, “mediaPlayer”: 1 “command”: {“play”:{“speed”: 1.0}} } } } “events”: [{ “deviceIds”: [“mediaplayerId”],“status”: { “code”: 200, “message”: “DeviceCommand Succeeded” },“events”: { “volume”: { “state”: {“volume”: 0.3} }, “mediaPlayer: {“state”: { “roPlayMode”: “PLAY”, “roCurrentTrack”: 3, “roTotalTracks”:12, “roTrackPosition”: { “time”: 0.23, “speed”: 1.0, “timestamp”:1409877649920 }, “roTrackInfo”: { “trackDuration”: 127.5, “title”: “SomeSong”, “album”: “Some Album” } } } } }] } }

Now in addition to a success status indicating that the command executedsuccessfully on the Device, all state that changed as a result is beingreturned. For the Volume Feature, the new volume of 0.3 is beingreturned, but the mute value is not because it was already unmuted. Forthe MediaPlayer Feature, a command was executed which cause multiplechanges in read-only state, including the current track changing, andinformation about the track position and the song currently beingplayed.

Because the Gateway only returns state deltas, a Client that is startingup (or reconnecting with PubNub more than 5 minutes from a previousPubNub connection) should first request the full state of the Devices onthe Gateway using a getState gateway command. The result of the getStatecommand is a response message with the events filled in for every Deviceand Feature. Thereafter it should be tracking the current state byapplying deltas from the events messages. This also works if a usermanually controls a Device, or if a Rule is executed on the Gatewaycausing a change. In this case, an asynchronous message with no commandwill be set over the GW→App channel, for example if a light is changed:

{ “header”: { “senderId”: “my-gateway-id”, “messageId”:“my-gateway-id:5678” }, “contents”: { “events”: [{ “deviceIds”:[“lightId”], “events”: { “level”: { “state”: {“level”: 0.74} } } }] } }

In this example, there is no commandDevices field set, and no statusunder events since this is simply reporting an external change in Devicestate.

If a Scene is activated (either directly or as a result of a Ruletriggering), a message would first be sent with just a “202 DeviceCommand Received” status for each device, followed by a messageincluding success/failure status and any resulting state changes. Unlikea commandDevice, a Scene can contain many disparate Devices, each whichcan independently succeed or fail. The following example shows a Sceneactivation with the media player and light from above, where the lightfails to activate:

Initial Message: { “header”: { “senderId”: “my-gateway-id”, “messageId”:“my-gateway-id:112358” }, “contents”: { “events”: [{ “deviceIds”:[“mediaplayerId”, “lightId”], “status”: { “code”: 202, “message”:“DeviceCommand Received” }, }] } } Final Result: { “header”: {“senderId”: “my-gateway-id”, “messageId”: “my-gateway-id:112358” },“contents”: { “events”: [{ “deviceIds”: [“mediaplayerId”], “status”: {“code”: 200, “message”: “DeviceCommand Succeeded” }, “events”: {“volume”: { “state”: {“volume”: 0.3} }, “mediaPlayer: { “state”: {“roPlayMode”: “PLAY”, “roCurrentTrack”: 3, “roTotalTracks”: 12,“roTrackPosition”: } “time”: 0.23, “speed”: 1.0, “timestamp”:1409877649920 }, “roTrackInfo”: { “trackDuration”: 127.5, “title”: “SomeSong”, “album”: “Some Album” } } } } }, { “deviceIds”: [“lightId”],“status”: { “code”: 500, “message”: “DeviceCommand failed” } }],“notification”: { “changeScene”: { “sceneId”:“sceneId”, “editable”:0 } }} }

3) Notifications

Notifications are sent on the Notify channel to both Gateways and Apps,and generally communicate asynchronous changes in the system:

union RvtNotification {  1: RvtCommissionGatewayNotificationcommissionGateway  2: RvtNewDeviceNotification newDevice  3:RvtDeviceUpdateNotification deviceUpdate  4: RvtGeofenceNotificationgeofence  6: RvtRuleNotification ruleUpdate  7:RvtDeviceDeleteNotification deviceDelete  8: RvtGatewayNotificationgatewayUpdate  9: RvtUnjoinDeviceNotification unjoinDevice 10:RvtGatewayHeartbeatNotification gatewayHeartbeat 11:RvtGatewayLogLevelNotification gatewayLogLevel 12:RvtManualTriggerNotification manualTrigger 13:RvtNewLogEntryNotification newLogEntry 14:RvtGatewayPermissionsNotification gatewayPermissions 15:RvtGatewayStatusChangeNotification gatewayStatusChange 16:RvtExistingDeviceNotification existingDevice 17:RvtChangeAttentionNotification changeAttention 18:RvtResetDemoGatewayNotification resetDemoGateway 19:RvtGetMediaChannelsNotification mediaChannelsUpdate 20:RvtExternalAccountUpdateNotification externalAccountUpdate 21:RvtOccupancyUpdateNotification occupancyUpdate 22:RvtOccupantNotification occupant 23: RvtSceneChangeNotificationchangeScene // Current scene 24: RvtSceneUpdateNotification updateScene25: RvtAssociationUpdateNotification updateAssociation 26:RvtAssociationSchemeNotification associationScheme 27:RvtGatewayDeleteNotification deleteGateway // factory reset is complete28: RvtResourceUpdateNotification updateResource }

The most common notifications are sent by Sugarmill when something abouta Device, Rule, or any other entity it persists is changed. For example,if the above call to change the Device name was made, aRvtDeviceUpdateNotification will be sent out indicating that Sugarmillshould be queried to get the undated Device information:

{ “header”: { “senderId”: “my-app-id”, “messageId”: “some-unique-id”“contents”: { “notification”: { “deviceUpdate”: { “updatedDeviceIds”:[“my-device-id”] } } } }

Note that the senderId of the entity which made the change request toSugarmill is passed through as the senderId on the notification, so thatsender may ignore its own notifications if desired.

Other notifications are used to communicate overall changes in App orGateway state. For example, an app may change its Occupancy from Away toHome:

{ “header”: { “senderId”: “my-app-id”, “messageId”: “my-app-id:13579”“contents”: { “notification”: { “occupant”: { “occupantId”: “my-app-id”,“occupancyStatus”: “HOME” } } } }

In response, the Gateway would update the overall Occupancy to reflectthis change:

{ “header”: { “senderId”: “my-gateway-id”, “messageId”:“my-app-id:13579” }, “contents”: { “notification”: { “occupancyUpdate”:{ “occupancyStatus”: “HOME”, “occupants”: [ { “occupantId” :“my-app-id”, “occupancyStatus” : “HOME” }, { “occupantId” :“another-app-id”, “occupancyStatus” : “AWAY” } ], “homeCount”: 1,“awayCount”: 1 } } } }

4. Pubnub Protocol

RTM Protocol 1.

Using PubNub Channels:

-   -   Each app→GW connection has 2 channels, one for each direction        (reduces “self” message traffic)    -   Each GW also has a single “notification” or “broadcast” channel        for notifications to reach gw and all devices    -   A sequence of messages (command+ACK1 and ACK2, REQ/RES) will        contain originator+msgid fields that uniquely identify the        sequence sent on individual channels vs the broadcast channel        due to security.

Commands are responded to by a broadcast ACK for receiving the message,and one for successful completion of an action. JSON outside of theheader can be packetized aata. Examples of the commands include, but arenot limited to:

-   -   (O, default value) means a value is optional, and what the        default is    -   Header (all messages, not packetized)    -   originator—UUID of the originator of a related set of messages,        for instance command and its acks    -   msgId—Unique (per originator) id generated by the originator for        this message    -   timeStamp—sender long of current time    -   version—major.minor protocol version    -   packetNumber (O)—which packet this is    -   packetTotal (O)—total number of packets that make up this        complete message    -   Command (sent by an app to gw channel to control a device)    -   cmd—name of the command    -   setState (state:{name:value . . . })    -   play (speed)    -   gotoTrack (tracknumber)    -   devIds—list of device/group/program UUIDs to apply this command        to    -   timeout (O, dev dependent)—how long in ms to try this command        for    -   ramp (O, instant)—time to “ramp” to this state    -   sync (O, true)—if multi/group of devices, whether it is more        important to sync them to change together or just change them        quickly    -   continuous (O, false)—whether the user is still setting this        value, i.e. finger still down. May only send initial and final        ACKs if this is set    -   args (O)—map of arguments for a given command    -   event (sent by anyone, generally from gw about device changes.        Can be an array of:)    -   type—type of the event    -   deviceState (changed state: {name: value . . . })    -   geoFence (threshold, lat, long)    -   devId (O)—device this event is from    -   mergable (O, true)—whether this can be merged with other events,        or can be received individually    -   timeout (O, forever)—how long this event is relevant for    -   args—map of arguments for the given event    -   Ack (sent in response to command to all apps, first when        received and mirroring the command, second once executed with        the event(s))    -   status—status of the execution of the command—2xx=success,        4xx=failed fatally, 5xx=failed retry-ably    -   202—Received—command received by gw and in progress (command        also included)    -   201—Success—command received and executed (events also included)    -   509—Superseded—command received but overridden by another        command    -   424—FailedFatal—(generic) command execution failed and cannot be        successful without some change    -   404—NoSuchDevice    -   405—InvalidCommand    -   422—InvalidArguments    -   400—FormatError    -   500—FailedRetry—(generic) command failed but could be retried    -   message (O)—human readable message for failure    -   Request (request from app to gw for a specific piece of info,        currently only device state)    -   type—what is requested    -   DeviceState (devId[s], or none to get all)    -   args (O)—args for the request    -   Response (returned to app from gw from a request)    -   type—what was requested    -   data—array of results    -   state: {name: value . . . }

Generally, a hub device is configured to support one or more smart homedevices used as a lighting source, a light switch, a thermostat, akeypad, a remote, a power outlet, an audio device, a sensor (e.g., amotion sensor, a door sensor and a water leak sensor), and a securitydevice (e.g., an electronic deadbolt). An example hub device 904 worksto manage a plurality of smart home devices, including Nest LearningThermostat (2nd Generation), Sonos Play: 1, Philips Hue Starter Pack,Belkin WeMo Insight Switch, Yale Real Living Touch Screen Lever DoorLock with Z-Wave, and Insteon RemoteLinc Wireless 4-button Keypad.

Example smart devices associated with lighting applications include, butare not limited to, Philips Hue Starter Pack, Philips Hue Bulb, PhilipsFriends of Hue LED Bloom, Philips Friends of Hue LED Light Strip,Philips Hue Downlight Lamp, and Insteon 2672-222 LED Light Bulb.

Example smart devices used as light switches include, but are notlimited to, GE Z-Wave 2-way Dimmer Switch (#45606), GE Z-wave In-WallDimmer (#45612), GE Z-Wave 3-way Switch Kit (#45614), GE Z-Wave 3-wayDimmer Switch Kit (#45613), Cooper Wiring Devices RF9501AW Single-PoleWireless Light Switch, Belkin WeMo Light Switch, Leviton VRS05-1LZ ViziaZ-wave Light Switch 5A, Leviton VRS15-1LZ Vizia RF+ Z-wave Light Switch15A, Leviton VRI06-1LZ Vizia RF+ Z-wave 600 W Dimmer, Leviton VRI10-1LZVizia RF+ Z-wave 1000 W Dimmer, Leviton VRF01-1LZ Vizia RF+ Z-wave 1.5AScene-Capable Quiet Fan Speed Control, INSTEON 2477D SwitchLincDual-Band Dimmer, GE Z-wave In-Wall Switch (#45609), and INSTEON 2477SSwitchLinc Dual-Band Switch.

Example smart devices used thermostats include, but are not limited to,Nest Learning Thermostat (2nd Generation), Honeywell YTH8320ZW1007/UZ-wave Enabled Programmable Thermostat, Trane TZEMT400BB3NX N N SLZ-wave Thermostat, Nest Learning Thermostat (1st Generation), HoneywellRTH6580WF1001/W Wi-Fi 7-Day Programmable Thermostat, HoneywellTH8320WF1029 Wi-Fi Touchscreen Programmable Digital Thermostat,Honeywell RTH8580WF Wi-Fi 7-Day Programmable Touchscreen Thermostat,Honeywell RTH9580WF Wi-Fi Thermostat, and INSTEON 2441TH Thermostat,

Example smart devices used keypads or remotes include, but are notlimited to, INSTEON 2444A3WH RemoteLinc Wireless 2-button Keypad,INSTEON 2342-222 RemoteLinc Wireless 8-button Keypad, INSTEON 2444A2WH4RemoteLinc Wireless 4-button Keypad, Aeotec DSA03202W-ZWUS Mini RemoteControl, Leviton VRCS4-M0Z Vizia 4-button Scene Controller, and LevitonVRCS1-1LZ Vizia 1-button Scene Controller.

Example smart devices associated with audio applications include, butare not limited to, Sonos Play:1, Sonos Play:3, Sonos Play:5, SonosPlayBar, Sonos Sub, Sonos Connect, and Sonos Connect:Amp.

Example smart devices used as power outlets include, but are not limitedto, GE Z-wave Fluorescent Light & Appliance Module (#45603), GE Z-WaveDuplex Receptacle (#45605), GE Z-Wave Lighting Control Outdoor Module(#45604), GE Z-Wave Wireless Lighting Control Lamp Module with DimmerControl (#45602), Leviton VRP15-1LW Vizia RF+ Plug-in Appliance Module,Belkin WeMo Switch, Belkin WeMo Insight Switch, INSTEON 2456S3ApplianceLinc Plug-In Appliance Module, Leviton VRP03-1LW Vizia RF+Z-wave Plug-in Lamp Dimming Module, Leviton VRR15-1LZ Vizia RF+Z-waveReceptacle, INSTEON 2457D2 LampLinc Plug-In Dual-Band Lamp Dimmer,INSTEON 2635-222 Plug-in Appliance On/Off Module, and INSTEON 2634-222On/Off Dual-Band Outdoor Module.

Example smart devices used as Sensors include, but are not limited to,Belkin WeMo Motion Sensor, INSTEON 2843-222 Wireless Open/Close Sensor,INSTEON 2845-222 Hidden Door Sensor, Aeotec DSB29-ZWUS Z-waveDoor/Window Sensor, 2nd Edition, Ecolink Z-wave Door/Window Sensor,Schlage RS100HC V N N SL Z-wave Home Door/Window Sensor, EverspringSM103-1 Z-wave Door/Window Sensor, Aeotec Z-wave Water Sensor, INSTEON2852-222 Water Leak Sensor, and INSTEON 2842-222 Wireless Motion Sensor.

Example smart devices associated with security applications include, butare not limited to, Kwikset 910 Z-wave SmartCode Electronic Deadbolt,Kwikset 912 Z-wave SmartCode Electronic Deadbolt w/i Lever, Yale RealLiving Electronic Push Button Deadbolt with Z-wave YRD210-ZW-619, YaleReal Living Electronic Push Button Lever Door Lock with Z-waveYRL-210-ZW-0BP, Yale Real Living Electronic Touch Screen Deadbolt withZ-wave YRD220-ZW-619, Yale Real Living Touch Screen Lever Door Lock withZ-wave YRL-220-ZW-619, Schlage BE369 Home Keypad Deadbolt with Z-wave,Schlage BE469 Camelot Touchscreen Deadbolt with Z-wave Schlage FE599Home Keypad Lever with Z-wave, Nest Protect Smoke Plus Carbon Monoxide,Battery S2001BW, and Danalock Bluetooth Z-Wave Smart Lock, compatiblewith iOS and Android 4.4, Wink and other Z-wave Devices.

Example smart devices used as shades include, but are not limited to,Somfy Z-wave to Digital Motor Interface (ZDMI).

A. Schlage Lock Support Notes

Below is a list of Schlage lock models supported by Revolv.

1) BE469 Model: touch screen model

2) BE369 Model: keypad model with non-motorized deadbolt

3) FE599 Model: keypad model with lever

1. How to Add Schlage Lock to Revolv:

1) From Revolv App, go to Add Devices

2) For model BE469 (touch screen), on the lock, press ‘Schlage’ button,then punch in 6-digit program code (which can be found on the back ofthe user guide), then press ‘0’.

For model BE369 and FE599 (keypad), on the lock, punch in 6-digitprogram code (which can be found on the back of the user guide) and waitfor three beeps, then press ‘Schlage’ button. When the keypad isilluminated, press ‘0’.

3) Note that Revolv may ask the user to repeat step 2 above twice inorder to successfully include the lock to the Revolv system. (The firsttime is used to determined whether we need to remove the lock frompreviously joined network or not).

4) Schlage requires that there is a 20-second wait after adding the lockbefore user can control it over the radio (using Z-Wave protocol) viaRevolv App. This is to give priority to manual control first.

2. Known Issues

-   -   Since the Schlage BE369 is not motorized, the Revolv App will        not lock or unlock the deadbolt for you. You may manually turn        the knob to lock or unlock the door. We advise against creating        a GeoSense Action to unlock the BE369 because the App can't        report the state of this lock.    -   When the Schlage BE369 is manually unlocked with a key, the        lock/unlock status is not correctly represented in the Revolv        App. A lock command will not lock the door and the state will        display as “locked.” This is a well-documented problem found        with the BE369 on all Z-wave controllers.    -   Schlage deadbolt entry sets can only be locked or unlocked by        the Revolv App when the key is in the locked position.    -   If a Schlage lock is set to manual key unlock override, then        it's status is not reported to Revolv via Z-wave. This is a        well-documented problem found with these locks on all Z-wave        controllers.    -   Lock codes cannot be retrieved from any Schlage lock as Schlage        does not allow this. The workaround is to create all of your        codes from the Revolv App so that we can keep a record of them        for you.    -   Locking or Unlocking the Schlage BE369 and FE599 cannot be used        as a trigger for Actions. This only works with the Schlage BE469        model.

B. Philips Hue

Philips has built a line of color LED lighting solutions under its Hueline, which are controlled by a hub that you plug in to your router.They offer a variety of bulbs, ambient lighting, and lightstripproducts.

1. Supported

Revolv supports the full line of Philips hue products. Currently you mayown a Hue hub connected to your home network to control them usingRevolv.

2. Discovery

If you have set up your Hue Hub properly on your home network, Revolvwill discover it automatically, and it will show up on the app Dashboardas “Hue Hub”. You may also manually search for it by entering “AddDevice” mode. Tap the SIMPLE tab in the Add Device view and then pressthe button on the Hue Hub. This allows Revolv to authenticate with it.Once you press the button, you should see All Hues and each individualbulb added to your Dashboard.

You can also add new bulbs to your Hue Hub using Revolv. Simply go intoAdd Device mode in the App, plug in the new bulbs somewhere near thehub, and watch as they pop up as new devices. Note that you CANNOT takebulbs that are associated with one Hue Hub, and move them to another HueHub with this method. Revolv may try to support this in the future,however for now you can use Hue's special Lampstealer app.

3. Operation

Revolv allows you to control each Hue light individually, as well as allof them at once using All Hues. Pick Colors lets you set both the colorand the saturation (whiteness) of the light.

4. Troubleshooting

-   -   Revolv is not finding my Hue hub

While Revolv should find your hub automatically, sometimes you can helpit along by manually going into Add Device mode. From you Inventory,just click “FIND NEW DEVICES”.

Check the LEDs on your Hue Hub. All 3 should be solid white. If the farright LED is blinking that indicates that your Hue Hub is offline. Trychecking your Ethernet cable, or power cycling.

-   -   All my hues are on full white when I got home!

Chances are you had a power outage that caused them all to turn on whenthe power came back on.

-   -   Revolv says it was able to adjust the Hue, but the light didn't        change

Occasionally we've seen Hue bulbs lose connection with the Hue Hub,which means we cannot control it. We've seen this more often if thebulbs are installed near WiFi equipment. When this happens,unplugging/replugging in the bulb seems to restore the connection.

-   -   I've lost/broken a bulb, but I still see it?

Revolv doesn't get any indication that a bulb is missing or broken, itwill still appear to be functioning properly through the Hue Hub. If youhave a bulb that is no longer connected, you have 2 options. You canremove it from the Dashboard by un-starring it in the Inventory. Second,you can tap on the bulb in question, tap the edit button next to thename at the top, tap HIDE THIS DEVICE in the popup dialog. The only wayto completely remove it from the Hue Hub is to factory reset the HueHub, re-link it to Revolv, and re-add all of the working bulbs.

-   -   I factory reset my Hue Hub and now it no longer works with        Revolv.

Go into your Add Device screen and select “Philips Hue Hub” under“Lights”. Rejoin your Hub by pressing the button on the top of thedevice.

C. Nest Thermostat

Nest is a smart, energy-conscious thermostat that learns to predict yourbehaviours and preferences over time. Two former Apple brains developedthe idea, and subsequently revolutionized the thermostat. The Nest teamhas now taken on Smoke and Carbon Monoxide Detectors with the NestProtect as their further contribution to the connected home.

1. Supported

Revolv supports the Nest thermostats, both 1st and 2nd generation.Revolv is capable of multiple Nest Thermostats in the household, as longas they are all on the same Nest Account. Once you authorize Revolv withyour Nest credentials, you will have access to all Nest Thermostats inthe home. We will release support for the Nest Protect at a later date.Check out our Supported Devices FAQ for the most up-to-date list!

2. Discovery

Revolv will automatically detect any Nest Thermostats that are on thesame WiFi network as your Hub. There is no need to go in to Add Devicesmode, it should be automatically found within 5-10 minutes of adding itto your home network.

Once your Nest Thermostat is discovered, you can tap on it and enteryour Nest account username and password. If it doesn't show upautomatically, you can enter your nest credentials manually by followingthe “Nest password change” instructions below.

If your Revolv is not discovering your Nest, then double-check yourusername and password to make sure that they are entered correctly (See“Nest password change” instructions below).

3. Operation

-   -   Home/Away:

Revolv currently only controls the “Home” setting. When the Nest is in“Away” mode, changing the temperature setting using the Revolv Appdoesn't have any effect until you switch the Nest back to “Home”—then ithas the value that we set. We will support switching between Home andAway in the future.

You can disable the “Auto Away” feature of your Nest by going toSettings in the Nest app, tap on “Nest Sense” and flip the switch to“off.” Now you can use the Revolv App to control your Nest thermostatwhen you're out and about.

4. Troubleshooting

Nest password change/Manual addition of a Nest Account:

If your Nest password (or username) changes, your Revolv App will nolonger be able to control your thermostat until you enter the newcredentials. You can reenter them in the Revolv App by doing thefollowing:

-   -   Go to Settings    -   Select Accounts    -   Tap on your Nest Account    -   Select the Trash icon    -   Now select the “+” in the upper right corner    -   Re-add your credentials    -   You should be all set!

D. Z-Wave

Z-Wave is a wireless networking protocol which has a large array ofrelatively inexpensive but reliable, fast smart devices, from bulbs andswitches to thermostats and sprinkler controls. The protocol is governedby a standard group called Z-Wave alliance. Each smart device goesthrough certificate process to ensure their interoperability.

The protocol is designed to work in a mesh network like fashion, meaningdevices can route messages for each other over multiple hops.

1. Supported

Currently Revolv supports most Z-Wave wall and plug-in switches,thermostats from Trane and Honeywell, locks from Yale, Kwikset andSchlage. We're currently working on expanding the support and arelooking for input from customers like yourself regarding which devicesto support next.

2. Discovery

Z-Wave devices keep state regarding joined and unjoined. The deviceneeds to be unjoined first in order to join to the network. Revolv hubis acting as a master controller in the network which all devices needto join to.

To join Z-Wave device to Revolv network, you first go into the “AddDevice” screen in the app, and then perform some action on the device toinitiate joining. For most Z-Wave devices, this means press the (join)button on the device. Pressing the button normally alternates betweenjoining and unjoining. If the device is already joined, it will unjoinand vice versa.

While in “Add Device” screen, Revolv will notify you when the device issuccessfully joined to the network. You may see the ‘We see your device,please interact with it one more time’ message asking you to interactwith the device again; that means Revolv has just unjoined the devicefrom its previous network and is now ready to join the device to theRevolv network. If the device is already joined to the Revolv network,Revolv intelligently recognizes that and will not unjoin or rejoin thedevice.

Joining other complex Z-Wave devices like thermostat and door lock isbest to following our in-app wizard. From “Add Device” screen, user canselect to search for the device to join and follow the step by stepinstructions.

Note that due to limitation with Z-Wave protocol, adding/joining andremoving of devices from the Revolv Hub (or any other controllers) needto be done within a one hop range. For Revolv Hub, the one hob distanceis about 65 ft through a few walls (this number will be different forother controllers). Once the device is added to the Hub, it can be movedfurther away and can be controlled over multiple hops.

3. Operation Notes

Revolv is currently designed to be the primary Z-Wave controller in theZ-Wave network. If user has existing Z-Wave network with other 3rd partycontrollers like Micasa Verde, user needs to create a new Z-Wave networkwith Revolv hub being the primary controller.

4. Troubleshooting

-   -   My lock stops working

The most common cause for this is low battery. For some locks like Yale,the low battery icon will blink when this happens. For others, thestatus LED may flash red. It's best to replace all batteries when thishappens. Once the battery is replaced, the lock can continue to work. Weare working on adding a feature in Revolv to indicate low battery in thefuture release.

-   -   My user code on the lock stops working

For Kwikset lock, if you have user code set up, after you join the lockto Revolv, the code will be erased. This seems to be an extra securitymeasure implemented by Kwikset to erase previous setting at join. Thisdoes not happen with Yale locks. Hence, user needs to reprogram the usercode after the lock is joined to Revolv.

E. Sonos

Spelled the same forwards, backwards, and upside down, SONOS builds avariety of awesome wireless speakers that let you stream your favoritemusic and radio stations all over your house.

1. Supported:

Revolv supports the Connect, Connect:Amp, Sub, PlayBar, Play:3, Play:5,and the Play:1 speakers from Sonos. For now, you still need to use theSonos app to set the current playlist/stream to listen to before you cancontrol via the Revolv App. You can choose whether to use Sonos with aBridge or ethernet cable, makes no difference to Revolv, we'll still beable to communicate with your speakers!

2. Discovery:

Lucky for you, Sonos discovery is as easy as doing nothing at all. Inmost cases, if your Sonos is connected to your home's network and youhave already set-up and run your Sonos app, Revolv will automaticallydetect it for you. If you get impatient, feel free to start the AddDevices screen to double-check finding them.

3. Troubleshooting:

-   -   My Sonos isn't being discovered by Revolv

It can take a while for Revolv to discover all of your Sonos devices.This is especially true if you have lots of networked devices such asWeMo switches and Philips Hue. Sometimes temporarily disconnecting theHue hub or a few WeMos can speed up the discovery of Sonos devices.Also, rebooting your router can help.

Check your “Hidden Devices” list. It's possible that the Revolv Appdiscovered your Sonos speaker but marked it as “Hidden” in the “HubSettings.” This usually happens if your speaker was previously includedas part of a group in the Sonos app. You'll want to open the Sonos appand un-group your speakers if you want individual control over them inRevolv.

-   -   App doesn't show any current song playing

The very first time that you join your Sonos speakers to Revolv, you'llneed to open the Sonos app and select a source or playlist for them toplay and tap the “play” button in the Sonos app. After you've done thisfor the first time, you should be able to control your Sonos speakersfrom the Revolv App.

App doesn't let me select a Channel. It just says “Any Channel.”

You may have to pick and choose your favorite sources and playlists fromthe Sonos App for a few days while Revolv learns your preferences. Afterthe first day of picking different music selections, Revolv should haveenough of them to begin displaying within the Revolv App.

-   -   I have some Sonos speakers in a group to play together, but        Revolv only shows one speaker

When Sonos speakers are grouped together, Revolv automatically hides allbut the “Master” speaker that controls the group and changes the icon toa double beamed musical note set. The “hidden” speaker(s) can be seen in“Hub Settings.”

-   -   Next Track stopped working on Pandora for me

Some Pandora accounts are limited to 5 “Skip Track” operations per hour,at which point you will no longer be able to use the Next Track featurefor awhile

-   -   Internet connection issues after adding Sonos devices (Network        Storm)

Sonos requires that one device be connected (bridge or speaker) to yourhome network via Ethernet. Be advised that ONLY one device should beconnected (unless you want to get into advanced setup). If you connectmore than one Sonos device to Ethernet, you will likely experiencedegraded network performance. See: http://bit.ly/leu7PSu

F. Belkin WeMo

Belkin builds a number of WiFi based WeMo devices including outlets,switches, and motion sensors.

1. Supported

Revolv supports WeMo wall switches, outlet switches, and in the nextupdate motion sensors.

2. Discovery

Currently you may first connect each WeMo device to your Wifi networkusing the WeMo app; see this video for details. Once connected, Revolvshould be able to automatically detect it. If you don't see it, you canspeed the process by going into the Add Device screen.

3. Troubleshooting

-   -   My WeMo device just stopped working

Occasionally these appear to lose their connection to your WiFi network.Try unplugging/replugging them in (or in the case of the wall switch,opening and closing the air gap) to reset the device. You might alsocheck the WeMo app to ensure that they are visible there. In rare cases,you may need to factory reset the device and set it up again.

G. Insteon

Insteon has a large array of relatively inexpensive but reliable, fastsmart devices, from bulbs and switches to thermostats and sprinklercontrols. We're particularly fond of their remotes, which give youbedside remote control of your whole house when you forget your phonedownstairs.

These are designed to be integrated into your house as a standalonesystem, where you can connect controlling devices like switches tocontrolled devices like light bulbs. Adding them to Revolv, however, ismuch easier, and opens them up to many more possibilities.

1. Supported

Currently Revolv supports most Insteon bulbs, wall and plug-in switches,motion sensors, remotes, switch/keypads, open/close (contact) sensors,and thermostats, and will eventually add garage door openers, andsprinkler controls. If there is enough interest, we can also add X-10(powerline) support.

2. Discovery

Insteon devices require that you first go into the “Add Device” screenin the app, and then perform some action on the device to “link” it up.For light bulbs this is plugging it in, while for most other devicesit's pressing and holding a Set button for about 5 seconds until youhear a double beep or see a double LED flash on the device.

Insteon devices are connected to each other outside of Revolv through acomplex linking operation. If you already have an Insteon systemconnected in this way, we highly recommend unlinking the system andconnecting the devices individually to the Revolv hub. Otherwise thedevices will continue to talk to and control each other in addition tothe Revolv control, and will also greatly slow the performance of thesystem down as they try to talk to each other.

You can do this via the Unlink procedures on each link you have, or (fareasier) factory reset each device. Factory reset is generally done byturning off/unplugging/opening the air gap on the device, then holdingdown the Set button while reconnecting it. Wait for a long beeeeeep, andwhen it stops let go of the set button.

3. Operation Notes

Insteon devices build a “mesh network” between each other, which meansif you add more plugged-in devices you can extend the range andreliability of your Insteon system.

4 scene remotes—these have a limitation that if you press the “On”button for a scene, you cannot press it again until you press the “Off”button for that scene

4. Troubleshooting

-   -   My Hue bulb/wall switch is not working

We've found that these devices can be susceptible to shielding insidemetal enclosures, for instance a bulb put into canned lighting or ametal wall outlet box. Try moving the hub closer or taking the deviceout of the enclosure to see if this is the problem. If so, you may tryputting another non-shielded Insteon device nearby, or (best) changingthe enclosure to plastic.

-   -   My Insteon devices are slow to respond

If you had a standalone Insteon setup before, you devices may still betrying to talk to each other. Your best bet is to factory reset thedevice as mentioned in Discovery above.

My Insteon devices are turning on even though not linked in the Revolvapp

If you had a standalone Insteon setup before, you devices may still betrying controlling each other. Your best bet is to factory reset thedevices as mentioned in Discovery above.

H. Mesh Networking

Revolv supports protocols like Z-Wave, Insteon, and Zigbee which utilizemesh networking to extend their range. This means that any plugged-indevice that communicates via one of these radios acts as a repeater, orextender, of the network. While the radios in Revolv itself can cover atleast 60 feet, adding more Insteon or Z-Wave devices will extend therange and robustness of those networks, allowing Revolv to cover a muchgreater distance.

What is claimed is:
 1. A method of commissioning an electronic device ina smart home environment, comprising: at an electronic device having oneor more processors, and memory storing one or more programs forexecution by the one or more processors, wherein device identificationinformation associated with the electronic device is stored in thememory of the electronic device: receiving from a client device one-waysignals that are encoded with communication data, wherein: the clientdevice is located in proximity to the electronic device; the clientdevice is executing a client-side application associated with a useraccount that generates the one-way signals; and the encodedcommunication data includes at least one or more network credentials ofa local area network and an authentication token, wherein theauthentication token provides sufficient information to identify theuser account of the client-side application; generating a link approvalrequest including at least the authentication token and the deviceidentification information associated with the electronic device,wherein the device identification information is obtained from thememory of the electronic device; accessing the local area network usingthe one or more network credentials provided by the client device; andsending the link approval request to a server via the local areanetwork, wherein the server is configured to confirm availability of theelectronic device for commissioning and to link the electronic devicewith the user account according to the authentication token and thedevice identification information associated with the electronic device.2. The method of claim 1, further comprising: prior to receiving theone-way signals, broadcasting a readiness indicator signal, wherein thereadiness indicator signal indicates to the client device that theelectronic device is ready for a commissioning process.
 3. The method ofclaim 2, wherein the electronic device includes a LED light indicatorthat generates the readiness indicator signal, and in accordance withthe readiness indicator signal, the LED light stays on, shines with aspecific color, or flashes with a light pattern.
 4. The method of claim1, wherein the one-way signals include optical signals, and the clientdevice is configured to provide the optical signals by one of a flashlight and a display screen of the client device.
 5. The method of claim1, wherein the client device includes a sensor configured to detect thatthe user has positioned the client device for coupling the one-waysignals to a corresponding sensor of the electronic device configured todetect the one-way signals, and automatically initializes acommissioning process for the electronic device in response to thedetecting.
 6. The method of claim 5, wherein the sensor includes atleast one of an accelerometer and a gyroscope.
 7. The method of claim 1,wherein the authentication token is provided by the server to the clientdevice, and the link approval request includes the authentication tokenwhen it is sent to the server for authenticating the commissioningprocess.
 8. The method of claim 1, further comprising the electronicdevice performing a network scan to obtain a network identification ofthe local area network, wherein the one or more network credentialsinclude a network password associated with the network identification.9. The method of claim 1, wherein the one or more network credentialsinclude a network identification and a network password that areassociated with the local area network.
 10. The method of claim 1,wherein the one or more network credentials include a hash valueassociated with a network identification and a network password that areused to access the local area network, further comprising: determininglocally at the electronic device the network identification based on thehash value.
 11. An electronic device, comprising: one or moreprocessors; memory storing one or more programs for execution by the oneor more processors, wherein device identification information associatedwith the electronic device is stored in the memory of the electronicdevice, the one or more programs including instructions for: receivingfrom a client device one-way signals that are encoded with communicationdata, wherein: the client device is located in proximity to theelectronic device; the client device is executing a client-sideapplication associated with a user account that generates the one-waysignals; and the encoded communication data includes at least one ormore network credentials of a local area network and an authenticationtoken, wherein the authentication token provides sufficient informationto identify the user account of the client-side application; generatinga link approval request including at least the authentication token andthe device identification information associated with the electronicdevice, wherein the device identification information is obtained fromthe memory of the electronic device; and accessing the local areanetwork using the one or more network credentials provided by the clientdevice; and sending the link approval request to a server via the localarea network, wherein the server is configured to confirm availabilityof the electronic device for commissioning and to link the electronicdevice with the user account according to the authentication token andthe device identification information associated with the electronicdevice.
 12. The electronic device of claim 11, wherein the deviceidentification information includes a device identification identifierrepresented by one of a serial number, a media control access (MAC)address, and a universally unique identifier (UUID).
 13. The electronicdevice of claim 11, wherein the electronic device is an existing hubdevice that has been commissioned in another smart home environment orassociated with another user account, and the server is configured tosend the link approval response to the client device only when the otheruser account approves the link approval request.
 14. The electronicdevice of claim 11, wherein the one-way signals are communicated via acommunication path having a substantially narrow bandwidth less than athreshold bandwidth.
 15. The electronic device of claim 11, wherein theauthentication token has been provided by the server to the clientdevice, and the link approval request includes the authentication tokenwhen it is sent to the server for authenticating the commissioningprocess.
 16. A non-transitory computer-readable storage medium storingone or more programs for execution by one or more processors, the one ormore programs comprising instructions for: receiving from a clientdevice one-way signals that are encoded with communication data,wherein: the client device is located in proximity to the electronicdevice; the client device is executing a client-side applicationassociated with a user account that generates the one-way signals; andthe encoded communication data includes at least one or more networkcredentials of a local area network and an authentication token, whereinthe authentication token provides sufficient information to identify theuser account of the client-side application; generating a link approvalrequest including at least the authentication token and the deviceidentification information associated with the electronic device,wherein the device identification information is obtained from thememory of the electronic device; and accessing the local area networkusing the one or more network credentials provided by the client device;and sending the link approval request to a server via the local areanetwork, wherein the server is configured to confirm availability of theelectronic device for commissioning and to link the electronic devicewith the user account according to the authentication token and thedevice identification information associated with the electronic device.17. The non-transitory computer-readable storage medium of claim 16, theone or more programs further comprising instructions for: establishingcommunication with one or more smart devices via one or morecommunication networks.
 18. The non-transitory computer-readable storagemedium of claim 17, wherein the one or more communication networks areimplemented based on at least one communication protocol of a groupconsisting of Insteon, IEEE 802.15.4, Wi-Fi, ZigBee, 6LoWPAN, Thread,Z-Wave, Bluetooth Smart, Bluetooth Low Energy, ISA100.11a, WirelessHART,MiWi, OSIAN, Ethernet, and HomePlug.
 19. The non-transitorycomputer-readable storage medium of claim 17, wherein the one or morecommunication networks are distinct from the local area network.
 20. Thenon-transitory computer-readable storage medium of claim 16, furthercomprising: establishing communication with one or more smart devicesvia one or more communication networks, wherein the one or morecommunication networks are implemented based on at least onecommunication protocol of a group consisting of Insteon, IEEE 802.15.4,Wi-Fi, ZigBee, 6LoWPAN, Thread, Z-Wave, Bluetooth Smart, Bluetooth LowEnergy, ISA100.11a, WirelessHART, MiWi, OSIAN, Ethernet, and HomePlug.